鍍金池/ 問(wèn)答/PHP/ php ./ext_skel: No such file or directo

php ./ext_skel: No such file or directory

我在 extension_dir 目錄運(yùn)行出現(xiàn):

./ext_skel: No such file or directory 

檢查了一下的確是沒(méi)有這個(gè)文件。

根據(jù)鳥哥這篇文章(http://www.laruence.com/2009/... 以及 https://mengkang.net/660.html),我把 PHP 在 linux 的擴(kuò)展目錄定位到 /usr/lib/php/20151012extension_dir 的值) 目錄中,因?yàn)?linux 并沒(méi)有像 win 下的 ext 目錄

請(qǐng)問(wèn)是我找錯(cuò)擴(kuò)展目錄了, 還是安裝 PHP 的時(shí)候有問(wèn)題?

跪求大神

回答
編輯回答
不討囍

你下載php源碼才有~在源代碼的ext目錄下

2018年1月3日 14:48
編輯回答
尐潴豬

那應(yīng)該是比較老的版本,新可以看到ext目錄下有個(gè)php文件ext_skel.php

$ php ./ext/ext_skel.php --help
?php ext_skel.php --ext <name> [--experimental] [--author <name>]
                 [--dir <path>] [--std] [--onlyunix]
                 [--onlywindows] [--help]

  --ext <name>        The name of the extension defined as <name>
  --experimental    Passed if this extension is experimental, this creates
                        the EXPERIMENTAL file in the root of the extension
  --author <name>       Your name, this is used if --std is passed and
                        for the CREDITS file
  --dir <path>        Path to the directory for where extension should be
                        created. Defaults to the directory of where this script
             lives
  --std            If passed, the standard header and vim rules footer used
             in extensions that is included in the core, will be used
  --onlyunix        Only generate configure scripts for Unix
  --onlywindows        Only generate configure scripts for Windows
  --help                This help

$ php ./ext/ext_skel.php --ext myfunc 
2018年8月30日 12:20