Jump to content

I cannot for the life of me remember this variable name


aeroswat

Recommended Posts

$_SERVER['DOCUMENT_ROOT'];

This will return the full path to the current directory the current top-level script (if includes, then the first script called) that has been called.

 

I suggest getting very intimate with the php manual:

http://php.net/manual/en/reserved.variables.server.php

 

Hope this helps,

-cb-

  Quote

$_SERVER['DOCUMENT_ROOT'];

This will return the full path to the current directory the current top-level script (if includes, then the first script called) that has been called.

 

I suggest getting very intimate with the php manual:

http://php.net/manual/en/reserved.variables.server.php

 

Hope this helps,

-cb-

 

Thanks that's it but it doesn't work for CRON jobs is there anything else I could do that might cover that part in cron jobs?

Put the server path in a config variable.

 

I'm afraid this is the only way i know of getting an absolute path with a GLOBAL variable stated.

 

This shouldn't be a problem for a cron job though, even if your uploading to 1000 websites you can make a php script to upload them for you and edit the config file as necessary.

 

-cb-

  Quote

Put the server path in a config variable.

 

I'm afraid this is the only way i know of getting an absolute path with a GLOBAL variable stated.

 

This shouldn't be a problem for a cron job though, even if your uploading to 1000 websites you can make a php script to upload them for you and edit the config file as necessary.

 

-cb-

 

Thanks. I have a few more problems to fix in the system before my temporary employment has expired so I don't think I have time to make that universal. I'll do it at home once I'm out.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.