Posted by d on 02/17/06 19:12
"Skeets" <skillet3232@yahoo.com> wrote in message
news:1140195590.341963.7660@g44g2000cwa.googlegroups.com...
> let's say i have a linux text file located and named...
>
> /var//status/info
>
> it has a "0" or a "1" in it to indicate on or off.
>
> can php read this file even though it isn't in the apache html
> directory tree? if so, how is this done?
$status=file_get_contents("/var/status/info");
:)
PHP is just a program, and as such can read anything in the computer it has
access to. As long as the user under which Apache runs can read that file,
then PHP can when it's being run from your webserver.
> tia...
hope that helps!
dave
[Back to original message]
|