centos7php配置在哪個位置
Ⅰ CentOS 7中php配置文件php.ini的放在哪個位置
/usr/local/正使用的php目錄/etc/php.ini
例如:
/usr/local/php54/etc/php.ini
Ⅱ CentOS 7中PHP配置文件php.ini的放在哪個位置
1.搜:
CentOS7 Apache where php.ini
參考:
Where is my php.ini file? linux, CentOS – Stack Overflow
去試試:
root@chantyou:~# php -i | grep "Loaded Configuration File" Loaded Configuration File => /etc/php.ini PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0 root@chantyou:~#
即:
/etc/php.ini
2.另外,也注意到:
通過phpinfo()的輸出,也可以看到php.ini文件的位置:
【已解決】CentOS 7中PHP配置文件php.ini的放在哪個位置
【總結】
通過執行命令:
php -i | grep "Loaded Configuration File"
或:
<?php phpinfo(); ?>
都可以找到對應的:
Loaded Configuration File
的值,對應的就是php.ini的位置。
比如此處的:
/etc/php.ini
本文開發(php)相關術語:php代碼審計工具 php開發工程師 移動開發者大會 移動互聯網開發 web開發工程師 軟體開發流程 軟體開發工程師
主題: PHP、Linux、UT、UTC、
Ⅲ CentOS 7中PHP配置文件php.ini的放在哪個位置
如果是RPM包安裝,應該在/etc下,如果是源碼包安裝,那是自己指定的。
Ⅳ CentOS 7中PHP配置文件php.ini的放在哪個位置
第一步:找到php命令在在哪裡
whereis php
第二步:執行通過php命令得到php.ini的位置
php --ini
還有什麼問題可以去後盾人看看,而且這種類型的還有很多!保證讓你大吃一驚!哈哈!
Ⅳ CentOS 7中PHP配置文件php.ini的放在哪個位置
通過執行命令:
php -i | grep "Loaded Configuration File"
或:
<?php
phpinfo();
?>
都可以找到對應的:
Loaded Configuration File
的值,對應的就是php.ini的位置。
比如此處的:
/etc/php.ini
Ⅵ CentOS 7中PHP配置文件php.ini的放在哪個位置
沒有規定要放在哪。只是有個默認指定的位置:PHP_PATH/etc/php.ini
不管是啟動php-fpm還是直接使用php運行php文件,都能過指定php.ini文件執行。
Ⅶ CentOS 7中PHP配置文件php.ini的放在哪個位置
在web根目錄下, 建立一個php文件,輸入 phpinfo ,然後看 搜 Loaded Configuration File,這個就是php.ini所在的目錄。
Ⅷ CentOS 7中PHP配置文件php.ini的放在哪個位置
1、可以通過安裝包的查找進行相應的搜索
whereisphp.ini
正常情況下,其位於 /etc/php.ini
Ⅸ CentOS 7中PHP配置文件php.ini的放在哪個位置
如果是rpm包安裝的應該在 /etc/php.ini
如果源碼安裝安裝到哪兒就在哪兒,你可以用find 檢索下
Ⅹ CentOS 7中PHP配置文件php.ini的放在哪個位置
新建文件:phpinfo.php,內容:<?php phpinfo(INFO_GENERAL); ?>
然後:php phpinfo.php|grep "Loaded Configuration File" 輸出的就是php.ini的絕對路徑了
另一種方法:php -r "phpinfo(INFO_GENERAL);"|grep "php.ini"希望能幫到你,我還要抓緊時間自己在後盾人平台自己學習呢,一起加油吧ヽ(^0^)ノ