Baidu's method of setting php.ini: 1. Unzip the downloaded php installation package; 2. Find the php.ini-development configuration file and change the file to php.ini; 3. Modify the configuration content. Can.
The operating environment of this article: windows7 system, PHP7.4 version, DELL G3 computer
How does Baidu set up php.ini?
Set the php.ini file in Baidu BAE
First unzip the downloaded php installation package, open the folder, and you will see what you see inside
Find the php.ini-development configuration file. The important step is to rename the file to php.ini
Use an editor like Editplus to open the file. If you open it with Notepad, the format may be messed up, as shown in the picture
## Then find; extension_dir = "./"; On windows:; extension_dir = "ext"
; extension_dir = "./"; On windows:extension_dir = "E:/Apache Group/PHP/ext"
##Find
;extension=php_fileinfo.dll;extension=php_gd2.dll;extension=php_gettext.dll;extension=php_gmp.dll;extension=php_intl.dll;extension=php_imap.dll;extension=php_interbase.dll;extension=php_ldap.dll;extension=php_mbstring.dll;extension=php_exif.dll ; Must be after mbstring as it depends on it;extension=php_mysql.dll;extension=php_mysqli.dll;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client;extension=php_openssl.dll;extension=php_pdo_firebird.dll;extension=php_pdo_mssql.dll;extension=php_pdo_mysql.dll;extension=php_pdo_oci.dll;extension=php_pdo_odbc.dll;extension=php_pdo_pgsql.dll;extension=php_pdo_sqlite.dll;extension=php_pgsql.dll;extension=php_pspell.dll;extension=php_shmop.dll
As required Turn on the corresponding functions. For example, if you want to connect to the database, you can remove the semicolon in front of;extension=php_mysql.dll and;extension=php_mysql.dll to enable the relevant functions
Set time zone,
;date.timezone =
is changed to
date.timezone = Asia/Shanghai
Recommended learning: "
PHP Video TutorialThe above is the detailed content of How to set php.ini in Baidu. For more information, please follow other related articles on the PHP Chinese website!