bruceb Posted June 14, 2010 Share Posted June 14, 2010 Hi Everyone, Trying to pass ${EXTEN} to a php file for processing. Not sure how to. The php file takes $did_numb as defined: <?php $did_numb = $_GET['did_numb']; ?> I know that http://serverIP/file.php?did_numb=416-444-5555 works fine but when calling php file by system() from dialplan how can this be done? exten => s,n,system(php file.php?did_numb=${EXTEN}) |||| This method doesn't work as "php file.php?did_numb=416-444-555" simply doesn't work from the CentOS prompt. What is the proper syntax here? I also want whatever that file.php returns to be saved in $var for later usage in dial-plan afterwards. Thanks. Link to comment https://forums.phpfreaks.com/topic/204694-how-to-pass-a-variable-from-bash-script-to-php-file-which-accepts-variable/ Share on other sites More sharing options...
trq Posted June 14, 2010 Share Posted June 14, 2010 You can pass arguments to a cli php script in the standard way. phpscript.php argument1 These arguments will end up within the $_argc array within your script. Link to comment https://forums.phpfreaks.com/topic/204694-how-to-pass-a-variable-from-bash-script-to-php-file-which-accepts-variable/#findComment-1071823 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.