Archive

Archive for the ‘PHP’ Category

ANM_CI – CodeIgniter Integration Library

March 28th, 2009

CodeIgniter _remap method – Power and Benefits

March 9th, 2009

If you are using Codeigniter (CI) then you will happy to know that, CI has a built in method named _remap which allows you to overwrite the behavior of calling your controller methods over URI. Usually the second segment of the URI determines which function in the controller gets called.

Now think about the following factors:

  • You want

$@!ful CodeIgniter, PHP , , , , , , , , , , , ,

How to enable rewrite module in XAMPP, WAMP and Apache

March 4th, 2009

If you are using XAMPP or WAMP as your web server, you may face a common problem that is the rewrite module (mod_rewrite) does not work properly. It is because the rewrite module is not enabled by default in Apache’s configuration settings. But you can enable it manually by doing few simple steps:

[googmonify]5620512288:center:180:150[/googmonify]

$@!ful Apache, PHP , , , , , , ,

How to remove index.php from Codeigniter URL

March 3rd, 2009

If you are using Codeigniter you are noticed that by default index.php will be included with your URL.

But you can easily remove index.php from your CodeIgniter’s URL so that your URL should be like:http://anmsaiful.net/blog/contact

[googmonify]5620512288:center:180:150[/googmonify]
[googmonify]5620512288:center:180:150[/googmonify]
[googmonify]5620512288:center:180:150[/googmonify]

To do this just follows the following steps:

    $@!ful CodeIgniter, PHP , , , , , , , , ,

    Optimize your PHP Code – Tips, Tricks and Techniques

    October 24th, 2008
      [googmonify]2908853635:center:468:60[/googmonify]

    1. If a method can be static, declare it static. Speed improvement is by a factor of 4
    2. echo is better than print
      [sourcecode language='php']
      echo( ‘CHECKMATE: PLAY with PROBLEMS’ );
      // is better than
      print( ‘CHECKMATE: PLAY with PROBLEMS’ );
      [/sourcecode]
    3. Use echo’s multiple parameters instead of string concatenation
      [sourcecode language='php']

    $@!ful PHP , , , , , , , ,