RE: [PHP] for loop not working

From: Date: Tue, 15 Jul 2014 21:34:25 +0000
Subject: RE: [PHP] for loop not working
Groups: php.general 
Request: Send a blank email to php-general+get-323617@lists.php.net to get a copy of this message
hadi am Samstag, 14. Juni 2014 - 21:47: > > You're missing ; after glob function. > > Thank all for tilling me putting ; after the function. > > Im getting an there error > > PHP Warning: file_get_contents($file): failed to open stream: No such file or > directory in /var/www/html/phptest/search2.php on line 18 > > Warning: file_get_contents($file): failed to open stream: No such file or > directory in /var/www/html/phptest/search2.php on line 18 > PHP Warning: unlink($file): No such file or directory in > /var/www/html/phptest/search2.php on line 22 > > Warning: unlink($file): No such file or directory in > /var/www/html/phptest/search2.php on line 22 > > But The file exists im sure about it. > no my dear, consider this statement in your code: > > > $filename = '$file'; you assign the string "$file" to $filename, and then you try this: > > > $file1 = file_get_contents($filename); that cannot work. please omit the single quotes ;-) Niklaus

« previous php.general (#323617) next »