没有这样的文件或目录,我下面的教程从Android上传图片到服务器和我使用的是服务器端的PHP,这是代码:的fopen(uploadedimages /):未能打开流:在
<?php
error_get_last();
chmod("./uploadedimages/", 777);
// Get image string posted from Android App
$base=$_REQUEST['image'];
// Get file name posted from Android App
$filename = $_REQUEST['filename'];
// Decode Image
$binary=base64_decode($base);
header('Content-Type: bitmap; charset=utf-8');
// Images will be saved under 'www/imgupload/uplodedimages' folder
$file = fopen('uploadedimages/'.$filename, 'wb');
// Create File
fwrite($file, $binary);
fclose($file);
echo 'Image upload complete, Please check your php file directory';
?>
当我尝试运行,它让我看到以下错误:
的fopen(uploadedimages /):未能打开流:没有这样的文件或目录 在...
fwrite()期望参数1到b Ë资源,在... FCLOSE定的boolean()预计参数1是资源,鉴于布尔...
我很新的PHP所以请帮助我(我发现一些答案从互联网,但它并没有为我工作)
一个经常运行到这个错误,并迅速解决它,请按照下列步骤操作:http://stackoverflow.com/a/36577021/2873507 –