search
Homephp教程php手册图解找出PHP配置文件php.ini的路径的方法

这篇文章主要介绍了图解找出PHP配置文件php.ini的路径的方法,其实就是使用phpinfo()函数输出PHP信息,然后找到Configuration File (php.ini) Path这节就可以了,需

近来,有不博友问php.ini存在哪个目录下?或者修改php.ini以后为何没有生效?基于以上两个问题,我觉得有必要教一下刚接触PHP的博友们如何找到PHP调用php.ini的路径目录。

一般安装PHP环境无非有两种平台,,Linux环境下与WIN平台下。而WIN平台居多,因为现在套装安装包非常方便,如appserv、wamp一件安装包等等。而Linux下也有LNMP一键安装包,非常方便。由于这些安装做了简化,所以自然的许多博友就不太清楚环境安装好了以后php.ini放在哪个目录下,或者在某个目录下找到了php.ini文件但不知是否是PHP程序调用的那个。

我们可以通过phpinfo查找php.ini路径
新建一个php页面,输入:
[code]

[code]

保存退出

使用浏览器访问页面,会看到是一个PHP配置信息的相关页面

找到Configuration File (php.ini) Path这一行

右边的值 /usr/local/webserver/php/etc 就是php.ini文件所在目录
最后修改以后要记得重启相关程序才能生效。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.