How Do I Know My PHP Setup is Working?

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


After you have successfully installed everything, it is time to check if php is working fine. Start the apache server or the xampp server. And create a file, named phptest.php. Add following line in that file:

Code:

 

<?php phpinfo(); ?>

 

Put this file in the root web directory. This means if you are running WAMPP on windows, put it in C:\wampp\htdocs. f you are using some web hosting server, upload it to the server where you would upload HTML files. Now open following link in browser.

 

 

http://localhost/phptest.php or http://your-domain/phptest.php

 

This would give you all the information related to the php and related modules. If you can see this screen, Congratulations you have php working fine and now you can start writing master codes in php.

 





Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.