我是 php 新手,我正在使用它通过 flutter 将图像从我的应用程序获取到我的计算机。当我在网络上打开该 php 文件时,它显示此错误
Warning: file_put_contents(C: mpp\htdocslutter_testelse value): failed to open stream: No such file or directory in C:\xampp\htdocs\flutter_test\upload_image.php on line 9
所以第 9 行有一个错误,这是 php 代码
<?php
$image = isset($_POST['image']) ? $_POST['image'] : "else value";
$name = isset($_POST['name']) ? $_POST['name'] : "else value";
$realImage = base64_decode($image);
// THIS IS LINE 9:
file_put_contents("C:\xampp\htdocs\flutter_test".$name, $realImage);
echo "Image Uploaded Greatly";
?>
慕村225694