1. Created a file : .htaccess on your folder.
2. Add below to .htaccess :
$vim .htaccess
AddType application/x-httpd-php .html .htm
3. Modify "apache2.conf".
$vim apache2.conf
AllowOverride None => AllowOverride All
4. Restart apache2.
$sudo service apache2 restart
Reference : http://www.bictor.com/2015/03/03/enable-php-in-html-or-other-files/
沒有留言:
張貼留言