Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Code to test PHP

Status
Not open for further replies.

likelylad

IS-IT--Management
Jul 4, 2002
388
GB
I have a Windows 2000 PC with Apache Web Server on it.
I have installed PHP on it to allow me to try and connect to a MySQL database.
Does anyone have any HTML code that will allow me to check whether the PHP installation is working properly before I try start connecting to the MySQL database
 
Use this:

page.php
-------------------------------------------------------
Can you see text between the <hr>'s?
<hr>
<?
print(&quot;Yes I can!&quot;);
?>
<hr>
-------------------------------------------------------

Rick
 
Hi RISTMO

Thanks for that.
PHP is not working properly for me.
I followed the instructions, you don't know any idiots guide to setting up PHP on the web

[sad]
 
Try the PHP Forum forum434. I had the same problem using Window 98 and ME. Now I am on XP. It was a pain to setup and still only half works so I can't help; sorry.

Rick
 
when you run the file what is happening?

is your machine trying to download the file?

if it is then apache hasn't been configured correctly. when i installed php onto our win2k running IIS it didn't setup the extension correctly to tell the web server that a .php file is to be processed by the php.exe library.

i don't know Apache so i can't tell you the steps to take, but that solved my problem.

check that

i would suggest running this code:

<?
phpinfo();
?>

it will tell you most of the variables that are set in the php.ini file. easier than looking through the text file !

hope this helps !

Tony

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top