Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP:错误`打开流失败:没有这样的文件或目录`_Php - Fatal编程技术网

PHP:错误`打开流失败:没有这样的文件或目录`

PHP:错误`打开流失败:没有这样的文件或目录`,php,Php,我是PHP新手,我想为图片制作一个上传程序。这是我的全部代码: <?php include "checkConnection.php"; $fileName = $_FILES['picture']['name']; //get the file name $fileSize = $_FILES['picture']['size']; //get the size $fileError = $_FILES['picture']['error']; //get the error when

我是PHP新手,我想为图片制作一个上传程序。这是我的全部代码:

<?php
include "checkConnection.php";
$fileName = $_FILES['picture']['name']; //get the file name
$fileSize = $_FILES['picture']['size']; //get the size
$fileError = $_FILES['picture']['error']; //get the error when upload
if($fileSize > 0 || $fileError == 0){ //check if the file is corrupt or error
$move = move_uploaded_file($_FILES['picture']['tmp_name'], 'home/mario/public_html/API/Content/Images/'.$fileName); //save image to the folder
........
........
?>

我读了一些关于这方面的文章,但它不起作用。任何窒息都会对我有帮助。提前谢谢

太尴尬了,我忘了在“home/…”前面的
/
,问题解决了

Warning: move_uploaded_file(home/mario/public_html/API/Content/Images/1492599446257.jpg): failed to open stream: No such file or directory in /home/mario/public_html/API/uploadFile.php on line 7

Warning: move_uploaded_file(): Unable to move '/tmp/phpPvn44L' to 'home/mario/public_html/API/Content/Images/1492599446257.jpg' in /home/mario/public_html/API/uploadFile.php on line 7