Results 1 to 2 of 2
so I just installed everything to run PHP, and I started with the Hello World tut.
I pasted
Code:
<html>
<body>
<?php
echo "Hello World";
?>
</body>
</html>
to a ...
- 07-07-2007 #1Just Joined!
- Join Date
- Aug 2005
- Posts
- 54
PHP newbie
so I just installed everything to run PHP, and I started with the Hello World tut.
I pasted
to a kate and saved it test.php on desktopCode:<html> <body> <?php echo "Hello World"; ?> </body> </html>
when I opened it, it asked me to either open it (with kate) or save it (as if I am downloading the page)
on the other hand, if I made a php file and put it in /var/www/
it works perfectly.
my question: should it only work in /var/www/ ??? is it normal like this?
if not , why is this happening?
- 07-07-2007 #2
The web server only processes pages from its web document root (/var/www in this case). To get scripts to run from another location, you can either change the document root in Apache's config file or make a directory where you want to write web documents and symlink it to a sopt in /var/www.
Stand up and be counted as a Linux user!


Reply With Quote