Supongamos que tengo los siguientes archivos:
prepend.php
echo "this is the prepended file
\n";
main.php
echo "this is the main file
\n";
append.php
echo "this is the append file
\n";
Si agregamos en el .htaccess las siguientes lineas:
php_value auto_prepend_file prepend.php
php_value auto_append_file append.php
Y navegamos en el archivo main.php en nuestro browser, lo que obtendriamos es:
this is the prepended file
this is the main file
this is the appended file
El comando php_value auto_prepend_file archivo.php en htaccess ANTEPONE el resultado de la ejecucion de archivo.php
Y por supuesto php_value auto_append_file archivo.php en htaccess ADICIONA el resultado de la ejecucion de archivo.php
Si NO QUEREMOS NINGUNA EJECUCION prepend ni append podemos poner en el htaccess:
php_value auto_append_file none
php_value auto_prepend_file none
Sin comentarios a “Automaticamente append o prepend archivos PHP utilizando .htaccess”
Por favor espera
Deja una respuesta