Re: [PHP] is_readable fails with a variable parameter
- Date: Tue, 29 Sep 2015 18:10:10 +0100
- From: richard gray <rich@xxxxxxxxxxxx>
- Subject: Re: [PHP] is_readable fails with a variable parameter
On 29/09/2015 17:51, Tommy Peterson wrote:
Is this a web based request or a CLI process? If it is the former then
see that the web server user/group has permissions to read not only the
file in question but also can scan all the directories in the path to
I am using a PHP API that uses is_readable as a check before a particular function does anything. The problem that I am having is that if I do something like
my code terminates as is_readable says it cannot read the file or there is a permissions issue. But if I go to the file path/name in $file_path_name (echoing it out to make sure) I can see and open the file.
If I edit the same code and do something like
the same code executes just fine.
At first I thought the variable was some how getting over written. But it isn't. It is just somehow the variable is not be interpolated correctly by is_readable like a hard coded path/file name is.
This is on Linux. And this is PHP 5.4.43
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php