stegers72 Posted September 16, 2013 Share Posted September 16, 2013 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 ... Quote Link to comment https://forums.phpfreaks.com/topic/282198-saving-image-to-folder-on-server/ Share on other sites More sharing options...
fastsol Posted September 16, 2013 Share Posted September 16, 2013 $handle = @fopen("/tmp/".$item['Picture'], "r"); Quote Link to comment https://forums.phpfreaks.com/topic/282198-saving-image-to-folder-on-server/#findComment-1449747 Share on other sites More sharing options...
raduenea Posted September 19, 2013 Share Posted September 19, 2013 This is a custom code or from a cms framework Quote Link to comment https://forums.phpfreaks.com/topic/282198-saving-image-to-folder-on-server/#findComment-1450208 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.