local test wampserver

Discuss server installationa nd configuration issues here

Moderators: egami, macek, gesf

Post Reply
User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 742
Joined: Mon Feb 22, 2016 5:52 pm

Tue Feb 23, 2016 2:57 am

During installation you would have been given a root address for the server, this is what I think you are referring to as your top level. Apache will only process files from this location*.

So if the apache root is www.

Code: Select all

windoze/index.php # can't execute this
wamp/html #can't execute here
wamp/html/www #can execute here
wamp/html/www/includes #can execute files in this location
wamp/html/www/includes/index.php #can
wamp/html/www/index.php # can execute this

* this can be changed but it's not worth it unless you have a genuine reason to do it; if you later upload these files to a web server it will break.

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 742
Joined: Mon Feb 22, 2016 5:52 pm

Fri Feb 26, 2016 7:00 pm

Are you using

Code: Select all

localhost/folder1/test.php
typed into the address bar of your browser?

User avatar
hyper
php-forum Fan User
php-forum Fan User
Posts: 742
Joined: Mon Feb 22, 2016 5:52 pm

Sat Feb 27, 2016 4:06 am

Try this

test2.php // new file

Code: Select all

echo "Testing\n";
error_reporting(E_ALL);
ini_set("display_errors", 1);
echo $should_be_an_error;#Undefined variable
include 'folder1/test.php'
save it in your root folder and execute it.

Post Reply