search
Homephp教程php手册PHP部署时的几个配置修改说明

PHP部署时的几个配置修改说明

1、short_open_tag 是什么呢?

决定是否允许使用代码开始标志的缩写形式( ?> )。如果要和 XML 结合使用 PHP,可以禁用此选项以便于嵌入使用 。否则还可以通过php来输出,例如: 。如果禁用了,必须使用 PHP 代码开始标志的完整形式( )。

注意:本指令也会影响到缩写形式 = ,它和 echo 等价。使用此缩写需要short_open_tag 的值为 On。

 

2、asp_tags是什么?

除了通常的 标志之外还允许使用 ASP 风格的标志 。这也包括了输出变量值的缩写 。

一般情况下我们会把asp_tags 的值设置为 On。

注意: ASP 风格标志的支持是 3.0.4 版新加的。

 

3.设置php扩展路径extension_dir="PHP解压路径\ext",调用mysql时需要用到。

如部署apche+mysql+php时通常需要将以下几个dll前的分号去掉,使其功能开启:

extension=php_bz2.dll

extension=php_gd2.dll

extension=php_gettext.dll

extension=php_mbstring.dll

extension=php_mysql.dll

extension=php_mysqli.dll

extension=php_openssl.dll

extension=php_pdo_mysql.dll

extension=php_sockets.dll

extension=php_xmlrpc.dll

 

4、设置中国时区 date.timezone = prc 

 date.timezone 是 PHP 5.1 中新增加的配置文件参数,默认 date.timezone 是被注释掉的,也就是默认时区是 utc,改时区为 date.timezone = PRC,可以解决时间相差八小时的问题。

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

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.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.