hi all:
having trouble setting up php - when i add the 3 line script to test in the browser - i pasted it into notepad then saved the file as : test.php - then opened it up in the browser - from there the only thing that happend was that it showed me the 3 line script i pasted instead of showing something else - any ideas? thanks.
Check real file name in Win-Explorer. Notepad automatically adds .txt to the end of every file unless you put the file name in double quotes: "test.php" Remove the .txt suffix and try again.
Norman
it's a php file with the internet explorer icon - tried what you said and in the browser it returns the line of code still
any suggestions?
How are you opening the file? Double-clicking in explorer won't work.
You need to make sure the document is in the apache document tree (usually apache\htdocs) and then fire up the browser and point it at http://localhost/whatever_path/test.php
hth, Nick M
Did you add these <?php ?> ??
Like this:
<?php
CODE
?>
let us know, so we can try to figure out what is wrong
reg kevin
yeah i can view html pages but for some reason when i view php pages in ie, it returns the script in text - wondering what's wrong - is there a line or so i have to overlook in httpd.default ?
let me know because this is seriously peeing me off l:0
Look at the replies from NJM and The Nookie. You need to do this:
Make file with the following content:
<?php php_info(); ?>
and save it as test.php in the folder which you have specified as your document root in the httpd.conf file of your Apache webserver.
Start Apache
Open IE and type in http://localhost in the URL field
You will see a list of files available in the docroot folder which you specified in httpd.conf. Click on test.php
If you now see a big coloured table of PHP configuration settings, then Bob's your auntie.
Best o luck