We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5b8437 commit d8d560bCopy full SHA for d8d560b
Demo/3#命令执行类函数/3.6.php
@@ -0,0 +1,6 @@
1
+<?php
2
+$result = popen('ls', 'r'); //参数1:执行Linux的ls命令 参数2:字符串类型
3
+//$result = popen('dir', 'r'); //参数1:执行Windows的dir命令 参数2:字符串类型
4
+echo fread($result, 100); //参数1:上面生成的资源 参数2:读取100个字节
5
+
6
+?>
0 commit comments