windows下面,PHP如何启动一些扩展功能
2024-09-08 09:50:06
我今天在试这个时,发现php有些默认设置,是需要人为介入修改的。
比如,当我们在安装一个软件,而这个软件需要启用php一些扩展功能。
那么,按一般套路,将php.ini文件里的相关行的注释去掉即可。
;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; If you wish to have an extension loaded automatically, use the following ; syntax: ; ; extension=modulename ; ; For example: ; ; extension=mysqli ; ; When the extension library to load is not located in the default extension ; directory, You may specify an absolute path to the library file: ; ; extension=/path/to/extension/mysqli.so ; ; Note : The syntax used in previous PHP versions ('extension=<ext>.so' and ; 'extension='php_<ext>.dll') is supported for legacy reasons and may be ; deprecated in a future PHP major version. So, when it is possible, please ; move to the new ('extension=<ext>) syntax. ; ; Notes for Windows environments : ; ; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+) ; extension folders as well as the separate PECL DLL download (PHP 5+). ; Be sure to appropriately set the extension_dir directive. ; ;extension=bz2 extension=curl ;extension=fileinfo extension=gd2 ;extension=gettext ;extension=gmp ;extension=intl ;extension=imap ;extension=interbase ;extension=ldap ;extension=mbstring ;extension=exif ; Must be after mbstring as it depends on it extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client ;extension=odbc extension=openssl ;extension=pdo_firebird extension=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql ;extension=pdo_sqlite ;extension=pgsql ;extension=shmop ; The MIBS data available in the PHP distribution must be installed. ; See http://www.php.net/manual/en/snmp.installation.php ;extension=snmp ;extension=soap ;extension=sockets ;extension=sqlite3 ;extension=tidy ;extension=xmlrpc ;extension=xsl
但,如果只是改这些的话,在windows环境,重启Php会看到这些warn,表示启用未生效。
so,看来php.ini里有默认的php扩展,如果不定义,在windows环境里,会到c:\php\ext目录下面去找。那么,肿么办?
自己改改呗,还是php.ini文件。
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" ; ; PHP's default setting for include_path is ".;/path/to/php/pear" ; http://php.net/include-path ; The root of the PHP pages, used only if nonempty. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if you are running php as a CGI under any web server (other than IIS) ; see documentation for security issues. The alternate is to use the ; cgi.force_redirect configuration below ; http://php.net/doc-root doc_root = ; The directory under which PHP opens the script using /~username used only ; if nonempty. ; http://php.net/user-dir user_dir = ; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "./" ; On windows: extension_dir = "d:\php72\ext" ; Directory where the temporary files should be placed. ; Defaults to the system default (see sys_get_temp_dir) ; sys_temp_dir = "/tmp"
然后,就没有然后啦。
最新文章
- RBAC模型速记
- gulp教程之gulp-less
- javascript:history.go()和History.back()的区别(转载)
- C# random生成随机数全部一样
- JavaScript Patterns 3.4 Array Literal
- poj 3335(半平面交)
- Android弱网测试中关于网络检测的一些借鉴方法
- ios知识点
- php中的数组定义和使用
- 你的Jsp页面有黄&#215;么,有黄色问号么?Multiple annotations found at this line: - Invalid location of tag (form). - No
- NuGet管理
- django进阶-4
- 【HTML】模板
- ssh 提示Connection closed by * 的解决方案
- IntelliJ IDEA 报错:找不到包或者找不到符号
- Java如何获取图片验证码保存
- kettle数据库连接使用变量
- iOS原生和React-Native之间的交互1
- windows7使用Source insight上远程改动ubuntu共享内核源代码
- Prism5.0开发人员指南内容 Contents of the Developer&#39;s Guide to Prism Library 5.0 for WPF(英汉对照版)
热门文章
- 好用的npm包或者工具
- python:时间格式转化
- python中__init__.py的作用、module和package
- 如何录制高清GIF格式的图片
- PHP Imagick文字加阴影(外发光)
- Windows下同时安装了Python2与Python3时如何使用RobotFrameWork
- Java中的常量池(字符串常量池、class常量池和运行时常量池)
- python 之 面向对象 (异常处理)
- Python输出菱形
- [Atcoder AGC030C]Coloring Torus