How can i access a php function in a file with file name "secret.info" ? sethandler,add handler are is not working

March 14, 2018 156 views
Apache PHP

<FilesMatch> SetHandler application/x-httpd-php
</FilesMatch>
AddHandler application/x-httpd-php .php

content of secret.info

<?php
phpinfo()
?>

1 Answer

If you want all .info files to be parsed as PHP, add this to your .htaccess file:

AddHandler application/x-httpd-php .php .info
Have another answer? Share your knowledge.