Re: [PHP] A Strange Problem

[email protected] (Tedd Sperling)
Newsgroups php.general
Message-ID <[email protected]>
Matijin:

My mistake in posting -- I have tried it several different ways including absolute.

Nothing works.

Cheers,

tedd

---
On Jun 20, 2013, at 1:43 PM, Matijn Woudt <[email protected]> wrote:

> 
> 
> 
> On Thu, Jun 20, 2013 at 7:39 PM, Tedd Sperling <[email protected]> wrote:
> Hi gang:
> 
> I have a very strange problem.
> 
> I can use this statement in one folder:
> 
>         $fcontents = file('docs/admin-email.txt');
> 
> But in a different folder with an exact path having 'docs/admin-email.txt', I get:
> 
> Warning: file(/docs/admin-email.txt) [function.file]: failed to open stream: No such file or directory in <cut> on line 83
> 
> 
> Are you sure it is the same string? It looks like this one has an extra '/' at the beginning?
>  
> This has got me really puzzled.
> 
> I have confirmed these are the exact same folders and files, except only in two different places on the server. Both are one level down from root.
> 
> Any ideas as to what is going on?
> 
> Cheers,
> 
> tedd
> 
> 
> 
> Else it could be permission item, I think the user executing the PHP script (www-user or such for apache), needs to have execute rights on all directories up to the file, to be able to read the file listing.
> 
> - Matijn 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.