0

我的PHP代码如下:

<?php
$name=$_POST["name"];
$image=$_POST["image"];
$decodedImage= base64_decode("$image");
$link="192.168.1.34:80/kullanici/profil/";
$link=trim($link);

//file_put_contents("C:\\xampp\\htdocs\\kullanici\\profil\\".$name.".JPG",$decodedImage);
file_put_contents($link.$name.".JPG",$decodedImage);
?>

如果我使用命令行,该函数可以工作,但是当我使用路径时192.168.1.34:80/kullanici/profil,它会给我这个错误:

file_put_contents(192.168.1.34:80/kullanici/profil/ad.JPG): failed to
open stream: Invalid argument in
4

0 回答 0