Jump to content

Saving image to folder on server


stegers72

Recommended Posts

Hello ;

 

What am I doing wrong, I am trying to save an image to a folder on a server, using a variable for image url, but I get an error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

<?php
$handle = @fopen("/tmp/<?=$item['Picture']?>", "r");
if ($handle) {
    while (!feof($handle)) {
        $buffer = fgets($handle, 4096);
        echo $buffer;
    }
    fclose($handle);
}
?>

What am I doing wrong ?

 

Thanks for any help ...

Link to comment
https://forums.phpfreaks.com/topic/282198-saving-image-to-folder-on-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.