Skip to content

Commit d8d560b

Browse files
authored
Create 3.6.php
1 parent c5b8437 commit d8d560b

File tree

1 file changed

+6
-0
lines changed
  • Demo/3#命令执行类函数

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)