JAVA、PHP、前端、APP、网站开发 - 开发技术学习

文档标签: shell_exec函数

PHP调用Linux系统的常用函数.

PHP调用Linux系统的常用函数 例如像 1、exec函数 2、system函数 还有哪些? 1、exec函数 [php] <?php $test = "ls /tmp/test"; //ls是linux下的查目录,文件的命令 exec($test,$array); //执行命令 print_r($array); ?> [/php] 2、system函数 [php] <?php $test = "ls /tmp/test"; $last = system($test); print "last: $last\n"; ?> [/php] passthru函数 [php] $test = "ls /tmp/test"; passthru($test); [php] popen函数 [php] $test = "ls /tmp/test"; $fp = popen($tes...

站点声明:部分内容源自互联网,为传播信息之用,如有侵权,请联系我们删除。

© Copyright 2011-2024 www.kfju.com. All Rights Reserved.
超级字帖 版权所有。蜀ICP备12031064号