The php.ini file is a PHP configuration file that contains various settings and parameters for a PHP runtime. If you need to customize or adjust the environment information, you can modify the php.ini. In Function Compute, the method of configuring the php.ini file varies based on the way you choose to create a function.
If you use a container image to create a function, configure the function in the regular way. Specifically, place the
php.inifile in the/usr/local/etc/phpdirectory. This method is suitable for users who are familiar with Docker.If you use a built-in runtime of Function Compute or a custom runtime to create functions, you can place
php.inifiles only in the/codedirectory. In this case, you can specify the path for reading the configuration file by configuring environment variables. The system obtains the configuration file based on this path. The following figure shows an example. For more information, see Environment variables.For more information, see PHP: The configuration file.
