Jump to content

"is_uploaded_file" check not working


ylkien

Recommended Posts

Hi,

I am having problems with checking this. It returns TRUE all the time. My code is below.

Does anyone know how to NULL the $_FILES['filename']['name'] ? That means making it to NULL (empty). I tried "$_FILES['filename']['name'] = NULL" but no effect.



[code]
if( is_uploaded_file($_FILES['Picture']['tmp_name']) )
{
$Target_Path = $_SERVER['DOCUMENT_ROOT'] . "/";

$Target_Path = $Target_Path . basename( $_FILES['Picture']['name']);

if(move_uploaded_file($_FILES['Picture']['tmp_name'], $Target_Path)) {
echo "The file ".  basename( $_FILES['Picture']['name']).
" has been uploaded";

} else{
echo "There was an error uploading the file, please try again!";
}
}


[/code]

Thanks
Link to comment
https://forums.phpfreaks.com/topic/34711-is_uploaded_file-check-not-working/
Share on other sites

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.