简体   繁体   中英

PHP.ini Default Dir Extensions

I have my php.ini as follows:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "C:\Program Files (x86)\PHP\ext"

I will distribuite my php application but I was wondering that not all users have their Windows OS on the default C:\\, suppose they use another letter like Y:.

How could I change "automatically" to the correct path. Like:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "Y:\Program Files (x86)\PHP\ext"

I can't go to every computer and change the default settings. So is there a way to do this by not changing it directly?

This seems to use ext relative to the PHP directory itself:

extension_dir = "ext"

Ie it should be irrelevant what drive or path PHP is installed on, as long as the extensions are in the ext directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM