Linux command within Javascript or PHP -


I have a Linux command line, which I need to execute either PHP or Javascript (PHP preference.)

Command

keygen AB3554C1D1971DB7 \ pc_code 365

However, I have a string like $ pccode on \ pc_code I want to change with where the user enters the generated PC code. This is for a legal project, but I get help when there is a problem with the creators of the program.

Please help!

It may be that this program is poorly written and its information output to stderr rather than stdout is. Or it may be that it is failing and printing (error) stderr error message correctly. In either case, shell_exec would not be able to capture stderr, however, you should be able to capture stderr by adding " 2> and <1> " at the end of your order, that is :

  $ Result = shell_exec ('keygen AB3554C1D1971DB7 \ pc_code 365 2 & gt; and 1'); Echo '& lt; Pre & gt; Htmlspecialchars ($ results) '& Lt; / Pre & gt; ';  Edit : For continuity, some of the following answers were mentioned in the comments on the following reply:  
< P> Maybe it does not like bare backlash? You can try " \\ pc_code "


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -