D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] PHP Scripts Continued



Richard Brown wrote:
Hi All

I wrote my first PHP script. A simple 'Hello World'!

<html>
<body>

<?php
$myvar="Hello World";
echo $myvar;
?>

</body>
</html>

When I try to run it through Mozilla I type:

file:///home/rich/test.php3

the file is found but no hello world. The source code is available but
no hello world.

Running Red Hat 9.

Any Ideas


I can tell you the exact problem here matey :-) (i did it 1st time too) php files MUST be pre-processed by a php enabled webserver (apache)

you will need to load the .php file to a web server.. (your own) and load it from there....


http://localhost/phptest/test.php


for example..

the default file base for RedHats apache server config is /var/www/html so load it there.. or read through the "userdir" section in /etc/httpd/conf/httpd.conf and set it up from there..

HTH

Neil


-- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.


Lynx friendly