mesumpips
(mesumpips)
July 2, 2022, 12:38pm
#1
Hello…
I need to know how to pass parameter to php, I want to upload image to localhost with xampp.
below is my php and my kodular:
gbrsave.php
<?php
$imgDir = "images/";
$fileName = $_REQUEST['fname'];
$data = file_get_contents('php://input');
$store = file_put_contents($imgDir.$fileName, $data);
if ($store !== false ) {
echo "File $fileName saved to server, $store bytes\n";
} else {
echo "File $fileName not saved\n";
}
?>
error said :
Notice: Undefined index: fname in d:\xampp\htdocs\niagatimur\gbrsave.php
and
Warning: file_put_contents(brg/): failed to open stream: No such file or directory in d:\xampp\htdocs\niagatimur\gbrsave.php
Please help me, what sintax should i use?
Thanks
This topic only now become hot topic after 1.5.5 updation
Pls read this
mesumpips
(mesumpips)
July 3, 2022, 5:50am
#3
Thankyou 4 your answer, however that not what im lokking for.
I want to take picture by phone then save it to pc/laptop,
my problem is i dont know how to pass my image from kodular to php,
I tried above picture come up error
I find many tutorial save image on hosting, not on pc, when i try this tutorial to save image on pc/laptop not success
maybe any one can help me?
thanks
ps: i use android 9 btw
mesumpips:
take picture by phone
It needs storage permission to take photo…
system
(system)
Closed
September 20, 2022, 1:19pm
#5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.