trying to install a site onto a WAMP server

I am getting error messages relating to what I think is defining my WEB ROOT and APP ROOT statements in my index file.
I think my WAMP server on Windows is configured correctly.

My page code starts like this:

<? $APP_ROOT = ""; $TITLE = ""; $FILE = __FILE__; include($APP_ROOT."include/header.php"); include($APP_ROOT."include/nav.php"); #content begins here ?>



<img src=“<?=$WEB_ROOT;?>images/spacer.gif” alt=""

my browser returns this:

( ! ) Notice: Undefined variable: WEB_ROOT in D:\wamp\www\russell\index.php on line 13
Call Stack

Time Memory Function Location

1 0.0005 141328 {main}( ) …\index.php:0
images/spacer.gif" alt="" width=“39” height=“15” border=“0”> ( ! ) Notice: Undefined variable: WEB_ROOT in D:\wamp\www\russell\index.php on line 14 Call Stack #TimeMemoryFunctionLocation 10.0005141328{main}( )…\index.php:0 images/spacer.gif" alt="" width=“480” height=“15” border=“0”> ( ! ) Notice: Undefined variable: WEB_ROOT in D:\wamp\www\russell\index.php on line 15 Call Stack #TimeMemoryFunctionLocation 10.0005141328{main}( )…\index.php:0 images/spacer.gif" alt="" width=“38” height=“15” border=“0”> ( ! ) Notice: Undefined variable: WEB_ROOT in D:\wamp\www\russell\index.php on line 18 Call Stack #TimeMemoryFunctionLocation 10.0005141328{main}( )…\index.php:0 images/spacer.gif" alt="" width=“39” height=“15” border=“0”> ( ! ) Notice: Undefined variable: WEB_ROOT in D:\wamp\www\russell\index.php on line 22

I admit my novice attempt to figure this out and appreciate any help in advance. I think my .ini files are correct but hopefully I can get some help. Thank you,

It is configured correctly. You have not defined $WEB_ROOT (as the error message says)

would I add a line like this in my index file:
[php]define(“WEB_ROOT”, “localhost”.$_SERVER[“SERVER_NAME”]."/");[/php]

or where is web root defined?

Thanks

It appears that $WEB_ROOT is being used as a relative path so it would entirely depend on your needs.

[php]$WEB_ROOT = “/”;[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service