On 15/10/11 08:35 AM, Simon J Welsh wrote:
Assuming you did $move_uploaded_file = move_uploaded_file($filename,
$destination);, then isset($move_uploaded_file) will always be true.
isset() just checks if the variable you past to it is set, not if it
has a non-false value. You could simply use
if(move_uploaded_file($filename, $destination)), or
My apologies - i forgot to include the $move_uploaded_file =
move_uploaded_file($filename, $destination); line.
I saw in the manual that isset() "isset --- Determine if a variable is
set and is not NULL" and thought if move_uploaded_file() returns false,
the error checking will be triggered.But now i see the sample code in
the manual and stand corrected.
So what was happening that $move_uploaded_file was set but empty.My
understanding of isset() was wrong.