Question:

How can I find out what my php is?

by  |  earlier

0 LIKES UnLike

I am trying to upload a forum onto my website but I have to have a specific php to do so, and I do not know what my php is or how to find out.

Also, is there a way to change or upgrade my php if it is not unstable?

 Tags:

   Report

3 ANSWERS


  1. The phpinfo function gives you feedback.

    create a new page with this code

    <?php phpinfo(); ?>

    If it's a home machine you can install a newer version of php on top of the old version.  If you lease a virtual server they usually offer both php4 and php5.  If they only offer php5 your application will probably still work since the two versions are pretty much backwards compatible.


  2. You can print information about your php using a built in function:

    phpinfo()

    An alternative, to just print the php version is:

    // prints e.g. 'Current PHP version: 4.1.1'

    echo 'Current PHP version: ' . phpversion();

    To update to a newer version of PHP you'll need to contact your webhost, assuming you're using a shared hosting service.

  3. Do you mean the version of PHP, like PHP 4 or PHP 5?

    You will have to consult your web host.  If you have a web hosting control panel, you may be able to find out on the cPanel homepage.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.