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





































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







沒有留言:




















window.___gcfg = { 'lang': 'zh-TW' };





Popular posts from this blog

迅雷 Thunder 7.9.43.5054 免安裝版 (9.1.41.914 安裝版) - 支援BT下載的萬用 檔案下載工具

qBittorrent 4.1.1 免安裝中文版 - 取代uTorrent的BT下載器

Nhiều đồn đoán cho rằng bộ đồ "phá vỡ quy tắc" của Meghan Markle được lấy cảm hứng từ trang phục của Công nương Diana