Question

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

Posted March 14, 2018 963 views
ApachePHP

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

content of secret.info

<?php
phpinfo()
?>

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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
Submit an Answer