Home >Backend Development >PHP Tutorial >Usage of php auto_prepend_file and auto_append_file
and set it like this in unix:
If you use these instructions, then There is no need to enter the include() statement, but the header and footer are no longer optional content on the page. If you are using the Apache web server, you can modify different configuration options for a single directory. This assumes that the server allows resetting its main configuration file. To set up automatic prepending and automatic appending to a directory, you need to create a file named .htaccess in the directory. This file needs to contain the following two lines of code:
Note: The syntax is different from the corresponding option in the configuration file php.ini, and is the same as php_value at the beginning of the line: no equal sign. Many configuration settings in php.ini can also be modified in this way. Setting options in .htaccess instead of php.ini or in the web server's configuration file will bring great flexibility. This can be done on a shared machine that only affects your directory. No server restart is required and no administrator rights are required. One disadvantage of using the .htaccess method is that every file in the directory that is read and parsed has to be processed every time, rather than just once at startup, so performance will be reduced. |