ice-o
February 26th, 2005, 07:23 PM
The script just doesn't work, i want the files to be uploaded to the folder i have givven in the variable, but i keep on getting the message: The folder = is not /home/eisokant/public_html/websystem/uploads/ writable, what can i do about it!!
/*adminuploadfile.php - the script*/
<?php
$filename=$_POST['file'];
$folder = "/home/eisokant/public_html/websystem/uploads/";
if (is_writable($filename)) {
if (!$upload = fopen($filename, 'a'))
{
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($upload) === FALSE)
{
echo "Cannot write to file ($folder)";
exit;
}
echo "Success, uploaded ($filename) to ($folder)";
fclose($upload);
}
else
{
echo "The folder = $folder is not writable";
}
?>
/*adminuploadfile.php - the script*/
<?php
$filename=$_POST['file'];
$folder = "/home/eisokant/public_html/websystem/uploads/";
if (is_writable($filename)) {
if (!$upload = fopen($filename, 'a'))
{
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($upload) === FALSE)
{
echo "Cannot write to file ($folder)";
exit;
}
echo "Success, uploaded ($filename) to ($folder)";
fclose($upload);
}
else
{
echo "The folder = $folder is not writable";
}
?>