คู่มือการใช้งาน: ค่า php.ini

This page is a translated version of the page Manual:Php.ini and the translation is 75% complete.
Outdated translations are marked like this.

php.ini เป็นไฟล์กำหนดค่า PHP ไฟล์นี้บางครั้งจะต้องมีการแก้ไข; เช่นอาจจำเป็นต้องตั้ง $max_nesting_level หากคุณได้รับข้อผิดพลาด "ข้อผิดพลาดร้ายแรง: ฟังก์ชันการซ้อนในระดับสูงสุดถึง '100' ถึงแล้วยกเลิก!" หลังจากที่คุณทำการเปลี่ยนแปลงให้ใช้ $apachectl เพื่อโหลดไฟล์กำหนดค่าใหม่โดยไม่ฆ่าเว็บเซิร์ฟเวอร์และเริ่มสำรองข้อมูล This file will sometimes need to be modified; e.g. it might be necessary to set xdebug.max_nesting_level = 200 if you get the error "Fatal error: Maximum function nesting level of '100' reached, aborting!" After you make changes, use /usr/local/apache/bin/apachectl graceful to reload the config files without actually killing the webserver and starting it back up.

If you are looking to enable/disable upload settings see LocalSettings.php

ตำแหน่งไฟล์

การติดตั้ง PHP บางไฟล์มีไฟล์ php.ini 2 ไฟล์หนึ่งไฟล์สำหรับโมดูล php_sapi ที่จัดการคำขอเว็บเซิร์ฟเวอร์และอีกไฟล์หนึ่งสำหรับไบนารีบรรทัดคำสั่ง PHP The former is used to adjust, for example, file size limits for image uploads.

To find the configuration file for the web module, create a sample php file with this content:

<?php
phpinfo();

และเข้าถึงจากเว็บเซิร์ฟเวอร์ ควรแสดงข้อมูลจำนวนมากเกี่ยวกับการติดตั้ง PHP ของคุณรวมถึงตำแหน่งของไฟล์ php.ini

ในการค้นหามันสำหรับไบนารีบรรทัดคำสั่งให้ใช้ php --ini

ดูเพิ่มเติมที่