Re: Weird problem with is_file()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25 April 2010 22:14, Michelle Konzack <linux4michelle@xxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I have a code sniplet which does not work and I do not know why:
>
> ----8<------------------------------------------------------------------
>  $isfile=shell_exec("ls /tmp/tdphp-vserver/SESSION_" . $_SERVER['REMOTE_ADDR'] . "_" . $_COOKIE['VSERVER_AUTHUSER'] . "_* |head -n1");
>
>  if (is_file($isfile)) {
> <snip>
> ----8<------------------------------------------------------------------
>
> nothing special, and the file  is there, but the stuff with
>
>    is_file($isfile)
>
> is not working...  If I enter the file in place of $isfile, then  it  is
> working.   Quoting of $isfile does not work too.
>
> What have a overseen?

var_dump($isfile);

Don't make assumptions of what the value is, just check it.

Regards
Peter


-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux