Warning: unlink() [function.unlink]: open_basedir restriction in effect. File() is not within the allowed path(s):
is what i'm getting for the code
if (file_exists($thumb)) {
echo "<b>$thumb</b>";
$fh = fopen($thumb, 'w') or die("can't open file");
fclose($fh);
unlink($myFile);
}
I can confirm that the path of $thumb is correct.
Any fixes?
Thanks i开发者_Python百科n advance.
Look in your php.ini setup. The open_basedir configuration setting restricts which areas of the filesystem your PHP script can access; if the file you're trying to delete is outside any directories specified there the unlink() call will fail.
精彩评论