PHP 快速導覽 - 核心延伸函數 程式執行相關 passthru()
- Get link
- X
- Other Apps

PHP 快速導覽 - 核心延伸函數 程式執行相關 passthru()
內建函數 (function) passthru() 用以執行外部指令
函數 | 說明 |
---|---|
void passthru(string $command [, int &$return_var]) | $command 為外部指令。 |
參數 (parameter) 為外部指令,須注意沒有回傳值。
舉例如下
<?php
passthru('php other.php');
/* 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:program04.php
功能:示範 PHP 程式
作者:張凱慶
時間:西元 2013 年 2 月 */
?>
other.php 如下
<?php
echo "something happenedn";
/* 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:other.php
功能:示範 PHP 程式
作者:張凱慶
時間:西元 2013 年 2 月 */
?>
執行結果如下

中英文術語對照 | |
---|---|
函數 | function |
參數 | parameter |
您可以繼續參考
程式執行相關
- escapeshellarg()
- escapeshellcmd()
- exec()
- passthru()
- proc_close()
- proc_get_status()
- proc_nice()
- proc_open()
- proc_terminate()
- shell_exec()
- system()
相關目錄
回 PHP 快速導覽
回 PHP 教材
回首頁
參考資料
http://www.php.net/manual/en/function.passthru.php
訂閱:
張貼留言 (Atom)
window.___gcfg = { 'lang': 'zh-TW' };
- Get link
- X
- Other Apps
沒有留言:
張貼留言