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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php