我想做一个系统,把该系统放在本地,该系统的功能是管理远程服务器(已Linux为例)的,问题就是怎样跟远程的服务器连接上然后进行控制它(前提我已经知道了Linux服务器的账户和密码)。 大虾们麻烦你们看看怎么做???
解决方案 »
- PHP图片上传
- 正则式处理产品名字符串生成字母顺序的产品索引,100分求高手指点
- 当在一个类中用 preg_replace 碰上了 $this时,悲剧发生了,请高手帮帮忙。
- <a>代替按钮 用链接进行表单的提交
- 怎样判断php数组下标是数字还是字符串?
- 用PHP做网站的朋友们,请留下你们的qq号码和qq群号码以便以后互相交流合做~ 强烈要求直顶!!!!!!!!!!!!
- 我想给每个值,都添加一个元素c => 3,有没有系统函数啊
- 谁能解答得出,留下E-mail,送本姑娘性感美图一张~~~(因MM实在是没分了!!各位大哥谅解!!!)
- .net转PHP
- 字符串直接转换成数组
- 请教替换TAB的问题
- 数组去掉重复值的问题
exec
(PHP 4, PHP 5)exec — Execute an external program说明
string exec ( string $command [, array &$output [, int &$return_var ]] )
exec() executes the given command. 参数command
The command that will be executed. output
If the output argument is present, then the specified array will be filled with every line of output from the command. Trailing whitespace, such as \n, is not included in this array. Note that if the array already contains some elements, exec() will append to the end of the array. If you do not want the function to append elements, call unset() on the array before passing it to exec(). return_var
If the return_var argument is present along with the output argument, then the return status of the executed command will be written to this variable.
返回值
The last line from the result of the command. If you need to execute a command and have all the data from the command passed directly back without any interference, use the passthru() function. To get the output of the executed command, be sure to set and use the output parameter. 范例Example #1 An exec() example<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo exec('whoami');
?>