You may add "\$_SERVER[DOCUMENT_ROOT].\"/path/to/file\"" to the database 
and then use eval() to evaluate. The better solution is obviously to 
store "/path/to/file" and append it to $_SERVER[DOCUMENT_ROOT] whenever 
you need the full path.

Bogdan

Michael Hazelden wrote:
> Hi all,
> 
> I'm attempting to store variables inside a database and then recall them.
> 
> What I want to do is store them dynamically though - so for instance - a
> path to a file will be stored in the DB as
> $_SERVER[DOCUMENT_ROOT]."/path/to/file"
> 
> But, obviously, when I retrieve this value, it retrieves it as a literal ...
> not much help because I want to parse it as a proper value.
> 
> Is there any way to retrieve that value and then parse it within the PHP to
> create the "c:/webconsole/path/to/file" string that can be stored within
> another variable?
> 
> Anybody got any thoughts?
> 
> Cheers,
> 
> Michael.
> 
> This message has been checked for all known viruses by the MessageLabs Virus Control 
>Centre.
> 
>       
> *********************************************************************
> 
> Notice:  This email is confidential and may contain copyright material of Ocado 
>Limited (the "Company"). Opinions and views expressed in this message may not 
>necessarily reflect the opinions and views of the Company.
> If you are not the intended recipient, please notify us immediately and delete all 
>copies of this message. Please note that it is your responsibility to scan this 
>message for viruses.
> 
> Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY
> 
> *********************************************************************



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to