my php file has got the following simple code : Time is
<?php echo date(‘H:i:s’);?>
and also the date is
<?php echo date(‘j F Y’);?>
But i get the next error on typing the command : http://localhost/time.php
404 Not Found An error occured trying to access document or resource /time.php. Please contact the server administrator if the problem is abnormal and persists.
But m not able to work through the mistake .m a novice for php .plz help .os is ubuntu 10.04 n i've anstalled apache2 n php5.
404 error signifies that the
time.php file isn't situated within the root directory that Apache is running from.
Probably you will have to move
time.php right into a
In Ubuntu, normally, this is situated in
Should you browse around in
/var/www/ you'll most likely look for a index.html file that consists of the "It Really WorksInch message. Place your
time.php within the same directory as that file.
To determine the issue open tour httpd file , usually situated in /etc/httpd/conf/httpd.conf Find DocumentRoot - check what folder is the document root. Within this folder tou can execute your php file. Have you install php in your server , local machine ?