Must_ba Posted March 27, 2017 Share Posted March 27, 2017 Hello guys ; I want to send my arguments from ; /usr/share/index.php In the ınsıde of this code I have variables like $arg1,$arg2 and etc... so I need to post this $arg1 and $arg2 varible or which values that these arguments hold to another php code for example ; /home/root/helping.php I make some research but I didnt see the clear results or helping instructions about that . Is there any way to copy or post this $arg1 and $arg2 variables to the helping.php ? Can you help me about that ... Thanks .. Best Regards Must_ba Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted March 27, 2017 Share Posted March 27, 2017 Your vague description doesn't help; show the concrete code. And why on earth do your put your PHP scripts into the home directory of the root user? Are you running them as root? Quote Link to comment Share on other sites More sharing options...
Must_ba Posted March 27, 2017 Author Share Posted March 27, 2017 Your vague description doesn't help; show the concrete code. And why on earth do your put your PHP scripts into the home directory of the root user? Are you running them as root? Hello Jacques1 ; index.php; <?php $arg1 = $_POST['input']; $arg2 = $_POST['input2']; echo exec("python /var/www/html/index.php.py "); ?> helping.php ; <?php $abc = ` echo '\x08\x08\xab' > /dev/ttymxc0 `; echo $abc ; ?> index.php at /usr/share/apache2/htdocs path helping.php is at /home/root path I'm taking for values when the zoom button is pressed , according to these values I m sending some data to serial port with helping.php . But I need to send my arg1 (which is zoom ) values to the helping.php , because of doing this at root directory is : I can only send data to serial port from the root directory in other directories it does not give the permission Do you have any suggestion ? Best Regards Must_ba Quote Link to comment Share on other sites More sharing options...
gizmola Posted March 27, 2017 Share Posted March 27, 2017 Look at these manual pages: http://php.net/manual/en/reserved.variables.argv.php http://php.net/manual/en/function.getopt.php Quote Link to comment 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.