Jump to content

[SOLVED] Permission Denied


supanoob

Recommended Posts

sounds like a folder permissions issue. 

 

a) what are you trying to do on that line

b)what chmod is your upload directory set to.

 

the permissions will probably need to be set to 777

 

But bewarned this does present a significant security risk

 

Will

This is the code, i will bold the line that is says the error is on

 

<?php

if ($_GET['step'] == 'upload_new_complete')
                      {
                      // Your file name you are uploading
$file_name = $HTTP_POST_FILES['ufile']['name'];

// random 4 digit to add to our file name
// some people use date and time in stead of random digit

//combine random digit to you file name to create new file name
//use dot (.) to combile these two variables

$new_file_name=$images_had.$account_id;

//set where you want to store files
//in this example we keep file in folder upload
//$new_file_name = new upload file name
//for example upload file name cartoon.gif . $path will be upload/cartoon.gif
$path= "/home/porky/public_html/".$new_file_name;
if($ufile !=none)
{
[b]if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))[/b]
{
echo "Successful<BR/>";

//$new_file_name = new file name
//$HTTP_POST_FILES['ufile']['size'] = file size
//$HTTP_POST_FILES['ufile']['type'] = type of file


echo "File Name :".$new_file_name."<BR/>";
echo "File Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>";
echo "File Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>";
echo "<a href=\"/profile/$new_file_name\">Click Here to View</a><br>";
echo "Image Thumbnail:<br>
<img src=\"/profile/$new_file_name\" width=\"150\" height=\"150\">";
}
else
{
echo "Error";
}
}
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.