No matter what I do, the script always returns permission denied. Chmod set to 777 via ftp.
ive read thru the past posts, and tried stuff ive come accross, but it still wont do it
Ive tried:
Code: Select all
<?php
// now delete counter file
$filename = $_SERVER["DOCUMENT_ROOT"] . '/test.txt';
if (file_exists($filename))
{
chmod($filename, 0777);
unlink($filename);
echo 'deleted... apparently';
}
-------------
// now delete counter file
$filename = $_SERVER["DOCUMENT_ROOT"] . '/test.txt';
if (file_exists($filename))
{
unlink($filename);
echo 'deleted... apparently';
}
------------
// now delete counter file
$filename = './test.txt';
if (file_exists($filename))
{
unlink($filename);
echo 'deleted... apparently';
}
?>What am i doing wrong? Do i need to get my host to change the setup?
other than doing a chown, i dont know what else to try