Web Hosting Talk







View Full Version : How to: create a new PHP Info page


diggleblop
05-18-2006, 12:43 AM
This will show you what modules you have running on your server, if they're enabled, the version number and a few other informative goodies.

1. If you don't already have an info.php page on your server, after reading this you will be able to create a new php text file and upload it to your server.

2. Open Notepad and name the file info.php

3. Your new info.php page should have 1 line of code only. Please put the following code in your new file:
<?php phpinfo() ?>

4. That's all you need, now save the file to your server's root folder, and view the php page in your browser.

Example http://www.enteryoursiteaddresshere.com/info.php

SlimSlyk
05-18-2006, 12:45 AM
<?php phpinfo(); ?>

That's the correct code...

diggleblop
05-18-2006, 12:46 AM
They both work because I just used the one I posted. :)

superprogram
05-18-2006, 02:37 AM
How can I customize the information I want to see
Where is the structure of phpinfo defined?

Mark S
05-18-2006, 03:00 AM
To a certain extent, you can.

Check out: http://us2.php.net/phpinfo

Apoc
05-18-2006, 09:42 AM
They both work because I just used the one I posted. :)

It might work but it's not properly coded. After every command you should use a ";".

On a sidenote: instead of <?php you could also just use <?

dollar
05-18-2006, 09:45 AM
On a sidenote: instead of <?php you could also just use <?

So long as the machine you are on is configured to support short tags ;) In a sitaution like this it is fine, but if you were to create a piece of PHP software for commercial pruposes I would always use the full tags.