The following are the 4 configuration modification instructions when deploying PHP. Please study and study them one by one.
1. What is short_open_tag?
Determines whether the abbreviated form of the code start mark ( ?> ) is allowed.
If you want to use PHP with XML, you can disable this option to facilitate the embedded use of . Otherwise, you can also output it through php, for example: .
If disabled, the full form of the PHP code start flag ( ) must be used.
Note: This directive also affects the abbreviated form =, which is equivalent to echo. Using this abbreviation requires short_open_tag to be On.
2. What is asp_tags?
Allows the use of the ASP-style flag <% %> in addition to the usual flag. This also includes the output variable value abbreviation <%= $value %>.
Normally we will set the value of asp_tags to On.
Note: ASP style flag support is newly added in version 3.0.4.
3. Set the php extension path extension_dir="PHP decompression path ext", which is needed when calling mysql.
For example, when deploying apche mysql php, you usually need to remove the semicolons in front of the following dlls to enable their functions:
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. Set China time zone date.timezone = prc
date.timezone is a newly added configuration file parameter in PHP 5.1. The default date.timezone is commented out, that is, the default time zone is utc. Changing the time zone to date.timezone = PRC can solve the eight-hour time difference. question.
The above is the entire content of this article. I hope you will remember these four important points, which will definitely come in handy when deploying PHP in the future.