Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.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,我创建了从服务器上传照片到另一台服务器的脚本 $file_name_with_full_path = realpath("imgs/classified/imgname.jpg"); $postimg = array('myfile'=>'@'.$file_name_with_full_path); 我在localhost上测试了这个脚本。它起作用了。但我在我的服务器上进行了测试。它不起作用了 这是我回显realpath时服务器上照片的完整路径 /home/admin/domains/m

我创建了从服务器上传照片到另一台服务器的脚本

$file_name_with_full_path = realpath("imgs/classified/imgname.jpg");
$postimg = array('myfile'=>'@'.$file_name_with_full_path);
我在localhost上测试了这个脚本。它起作用了。但我在我的服务器上进行了测试。它不起作用了

这是我回显realpath时服务器上照片的完整路径

/home/admin/domains/mydomain.com/public_html/autopost/imgs/classified/imagename.jpg

它没有错误。

文件夹中是否有php用户写入权限?文件夹存在吗?@donald123是的,文件夹存在。