string(14) "H:\phpD394.tmp"Но файла, как такового, там нет. В чем может быть проблема? В конфиге PHP правлю временную директорию - инфа из дампа меняется но файл не наблюдается. Все это происходит под виндой.
<?php
define('GW_UPLOADPATH', 'images/');
$name=$_POST['name'];
$score=$_POST['score'];
$pic = $_FILES['screenshot'];
$pic=move_uploaded_file($_FILES['screenshot'], GW_UPLOADPATH);
?>
bool(false)
Array ( [screenshot] => Array ( [name] => WIN_20131201_052047.JPG [type] => image/jpeg [tmp_name] => H:\phpB65.tmp [error] => 0 [size] => 122294 ) )
Warning: move_uploaded_file(C:/srv/OpenServer/domains/localhost/images/) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\srv\OpenServer\domains\localhost\tmp\addscore.php on line 29
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'H:\phpABBE.tmp' to 'C:/srv/OpenServer/domains/localhost/images/' in C:\srv\OpenServer\domains\localhost\tmp\addscore.php on line 29
?php
$name=$_POST['name'];
$score=$_POST['score'];
$uploads_dir = '/images';
$tmp_name = $_FILES["screenshot"]["tmp_name"];
$name = $_FILES["screenshot"]["name"];
move_uploaded_file($tmp_name, "$uploads_dir/$name");
if ($_POST['submit']==true) {
$mysqli->query("INSERT INTO guitar VALUES(0, NOW(), '$name', '$score', '$pic')");
}
?>
Warning: move_uploaded_file(/images/WIN_20131204_232139.JPG) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\srv\OpenServer\domains\localhost\tmp\addscore.php on line 35
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'H:\php49F4.tmp' to '/images/WIN_20131204_232139.JPG' in C:\srv\OpenServer\domains\localhost\tmp\addscore.php on line 35