我想打印出错误的原因。
error_get_last() 似乎没有返回任何东西。rename() 返回 TRUE|FALSE 而不是异常。
if (!rename($file->filepath, $full_path)) {
$error = error_get_last();
watchdog('name', "Failed to move the uploaded file from %source to %dest", array('%source' => $file->filepath, '%dest' => $full_path));
}