php ./ext_skel: No such file or directory

我在 extension_dir 目录运行出现:

./ext_skel: No such file or directory 

检查了一下的确是没有这个文件。

根据鸟哥这篇文章(http://www.laruence.com/2009/... 以及 https://mengkang.net/660.html),我把 PHP 在 linux 的扩展目录定位到 /usr/lib/php/20151012extension_dir 的值) 目录中,因为 linux 并没有像 win 下的 ext 目录

请问是我找错扩展目录了, 还是安装 PHP 的时候有问题?

跪求大神

阅读 3.5k
2 个回答

你下载php源码才有~在源代码的ext目录下

新手上路,请多包涵

那应该是比较老的版本,新可以看到ext目录下有个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 
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题