I building a simple shopping cart for the first time ever from a tutorial but i am stuck on one thing. I dont know what to do with the following code. Could anyone offer some assistance? Much appreciated.
PHP Code:
// setting up the web root and server root for
// this shopping cart application
$thisFile = str_replace('\\', '/', __FILE__);
$docRoot = $_SERVER['DOCUMENT_ROOT'];
To be perfectly honest, there's nothing you would need to do with that section of code at least... that is to say, you should just be able to leave it.
What's happening that makes you think you need to change it?
$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the » CGI 1.1 specification, so you should be able to expect those.
You should be able to write in the path for this varible.
$docRoot = 'C:/path/to/document/root/';
__________________
<mgraphic /> - I don't have a solution but I admire the problem.