File tree Expand file tree Collapse file tree 8 files changed +32
-96
lines changed Expand file tree Collapse file tree 8 files changed +32
-96
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3535 " argc.md" ,
3636 " args.md" ,
3737 " system-commands.md" ,
38- " exec.md" ,
39- " shell_exec.md" ,
40- " shell_exec2.md" ,
41- " system.md" ,
42- " passthru.md" ,
38+ " system-commands2.md" ,
39+ " system-commands3.md" ,
4340 " escaping-shell-commands.md" ,
4441 " escapeshellcmd.md" ,
4542 " escaping-arguments.md" ,
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #### Executing System Commands
2+
3+ <dl >
4+ <dt class="fragment" data-fragment-index="0"><code>exec()</code></dt>
5+ <dd class="fragment" data-fragment-index="0">Returns the last line of output as a string.</dd>
6+ <dt class="fragment" data-fragment-index="1"><code>shell_exec()</code></dt>
7+ <dd class="fragment" data-fragment-index="1">returns <strong>full</strong> output as a string.</dd>
8+ <dd class="fragment" data-fragment-index="2">Can also be represented using the backtick operator:
9+ <pre><code class="lang-php">\`ls -al` === shell_exec('ls -al')</code></pre>
10+ </dd>
11+ </dl >
12+
13+
14+ Note:
15+
16+ If you require multiple lines of output, use shell_exec()
Original file line number Diff line number Diff line change 1+ #### (Even More) System Commands
2+
3+ <dl >
4+ <dt class="fragment" data-fragment-index="0"><code>system()</code></dt>
5+ <dd class="fragment" data-fragment-index="0">Flush the output buffer after each line</dd>
6+ <dt class="fragment" data-fragment-index="1"><code>passthru()</code></dt>
7+ <dd class="fragment" data-fragment-index="1">Returns the raw output.</dd>
8+ <dd class="fragment" data-fragment-index="2">Great for working with binary files or interactive output</dd>
9+ </dl >
10+
11+
12+ Note:
13+
14+ If you require multiple lines of output, use shell_exec()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments