ShivaGupta Posted July 10, 2013 Share Posted July 10, 2013 <?php $card_image="test.jpg"; $cmd="curl -F userfile=$card_image \ -F outputencoding=\"utf-8\" \ -F outputformat=\"txt\" \ http://example.com/cgi-bin/weocr/ocr_scene.cgi >result.txt"; exec($cmd, $result); echo $result[0]; ?> Link to comment https://forums.phpfreaks.com/topic/280044-exec-not-returns-output/ Share on other sites More sharing options...
kicken Posted July 10, 2013 Share Posted July 10, 2013 You're redirecting your output to result.txt. There's no output for exec() to capture and return as a result of that. $result = file_get_contents('result.txt'); to get your output, or stop redirecting it at all. Link to comment https://forums.phpfreaks.com/topic/280044-exec-not-returns-output/#findComment-1440223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.