PHP/File Directory/move uploaded file — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 07:04, 26 мая 2010
Using the move_uploaded_file() Function
<?php
$tmp_filename = $_FILES["myupload"]["tmp_name"];
if(!move_uploaded_file($tmp_filename,"/path/to/dest/{$_FILES["myupload"]["name"]}")) {
echo "An error has occurred moving the uploaded file.<BR>";
echo "Please ensure that if safe_mode is on that the " . "UID PHP is using matches the file.";
exit;
} else {
echo "The file has been successfully uploaded!";
}
?>