PHP 8.3.4 Released!

php_ini_loaded_file

(PHP 5 >= 5.2.4, PHP 7, PHP 8)

php_ini_loaded_fileYüklü php.ini dosyasının dosya yolunu döndürür

Açıklama

php_ini_loaded_file(): string|false

Bir php.ini dosyası yüklü mü diye bakar ve dosyanın yolunu döndürür.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

php.ini yüklüyse dosyanın yolu, değilse false döner.

Örnekler

Örnek 1 - php_ini_loaded_file() örneği

<?php
$inipath
= php_ini_loaded_file();

if (
$inipath) {
echo
'Yüklü php.ini: ' . $inipath;
} else {
echo
'Bir php.ini dosyası yüklü değil';
}
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

Yüklü php.ini: /usr/local/php/php.ini

Ayrıca Bakınız

add a note

User Contributed Notes 4 notes

up
3
geekcom
4 years ago
To find your php.ini just run

php --ini
up
-2
Andy Dodd
8 years ago
Or you could use
php -i | grep php.ini
up
-6
yc
7 years ago
you can also do:

php -i | grep "Configuration File"
up
-12
litelus
9 years ago
quick way to find the ini loaded for the cli
php -r "echo php_ini_loaded_file();"
To Top