How to run code of php5 on a server with php4 using htaccess

This is big question for beginners every time.Now as we know that php5 is in full flow but still there are lot of servers out there with php4 and if you upload your php5 code on those servers then it will be mess.May be your site will not run or any part or your will go down.But don’t worry friends , there are only 2 lines to put this problem far from you.
Just put these 2 lines below in a htaccess file and put that htaccess at the root directory.

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4

Now all the modules either they have written in php4 or php5 will work very well.

Related posts:

  1. .htaccess file at godaddy
  2. What is PHP ?
  3. Php mail function
  4. How to show 50 characters per line from a long sentences with PHP?
  5. How to list include files in our script

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>