0

My PHP code is as follows:

<?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);
?>

If I use the commanded line the function works, but when I use the path 192.168.1.34:80/kullanici/profil it gives me this error:

file_put_contents(192.168.1.34:80/kullanici/profil/ad.JPG): failed to
open stream: Invalid argument in
maxhb
  • 8,554
  • 9
  • 29
  • 53
Nurullah.c
  • 53
  • 1
  • 9

0 Answers0