You are here: Re: PHP and Reading Linux Text Files « PHP Programming Language « IT news, forums, messages
Re: PHP and Reading Linux Text Files

Posted by Steve on 02/17/06 22:24

On Fri, 17 Feb 2006 17:12:39 +0000, d wrote:

> "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

Safe mode may get in your way???

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация