[英]call command line program with php
I have a program running on my command line. 我的命令行上运行了一个程序。 The program allows one to type in a username and returns a bunch of information pertaining to that user. 该程序允许输入用户名,并返回一堆与该用户有关的信息。 I assume it is possible to access this program from php, and even store the information in a variable. 我认为可以从php访问该程序,甚至可以将信息存储在变量中。 Anyone know how to do this though? 有人知道该怎么做吗?
Thanks in advance for the advice 预先感谢您的建议
try using the system()
command. 尝试使用system()
命令。
http://php.net/manual/en/function.system.php http://php.net/manual/zh/function.system.php
or exec()
或exec()
http://www.php.net/manual/en/function.exec.php http://www.php.net/manual/zh/function.exec.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.