sksingh Posted May 8, 2010 Share Posted May 8, 2010 I am writing a php code in which i am trying to implement the following - I have made a exe program in c++ which takes a string input from the user and then displays the output; - Now in php, i am calling this program using passthru(), system(). like passthru('/var/php/hash') - if i pass the string along with it works like passthru('/var/php/hash "hello"') - but i dont want this, i want user to input a string and then pass that string as variable along with passthru command. i will be greatfull if someone can help me. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/201079-passing-variable-along-with-exe-in-passthru-or-system/ Share on other sites More sharing options...
xeross Posted May 8, 2010 Share Posted May 8, 2010 passthru('/var/php/hash "' . $sanitized_variable . '"'); But you better make it 100% secure because if there's a leak here I'm sure it can be exploited pretty badly. Link to comment https://forums.phpfreaks.com/topic/201079-passing-variable-along-with-exe-in-passthru-or-system/#findComment-1055024 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.