📜  php 执行命令并显示输出 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:37.531000             🧑  作者: Mango

代码示例1
They have slightly different purposes :-

1. exec() is for calling a system command, and perhaps dealing with the
  output yourself.
2. system() is for executing a system command and immediately displaying
  the output - presumably text.
3. passthru() is for executing a system command which you wish the raw
  return from - presumably something binary.
  
Regardless, I suggest you not use any of them. They all produce highly
  unportable code.