[英]How to add php script in Szimek/Signature_Pad (index.html)?
PHP tag is not working in my index.html file
PHP 标记在我的
index.html file
不起作用
But if I change index.html
to index.php
then it prints the app.js
code on index file.但是,如果我将
index.html
更改为index.php
那么它会在索引文件上打印app.js
代码。
What web server are you using?你使用的是什么网络服务器? Your web server is probably not configured to run PHP files with an
html
extension.您的 Web 服务器可能未配置为运行带有
html
扩展名的 PHP 文件。
According to the answer from this question , you can configure Apache to run files with an html
extension as PHP using a .htaccess
file.根据这个问题的答案,您可以将 Apache 配置为使用
.htaccess
文件将带有html
扩展名的文件作为 PHP 运行。
Create a .htaccess file at the root of your website and add this line:
在您网站的根目录创建一个 .htaccess 文件并添加以下行:
[Apache2 @ Ubuntu/Debian: use this directive]
[Apache2 @ Ubuntu/Debian:使用这个指令]
AddType application/x-httpd-php .html .htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.