Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 PHP-7.1.6 中启用、设置“security.limit_extensions”、执行 .shtml 文件?我收到错误“访问脚本 '/var/www/..../file.shtml' 已被拒绝(请参阅 security.limit_extensions)” file.shtml 如下
<?php include ("web.php"); ?>
1 - 找到php配置文件
php-fpm.conf
2 - 编辑 security.limit_extensions 行,将 .shtml 添加到其中。
security.limit_extensions = .php .html .shtml
3 - 如果该行不存在,只需添加到文件中
4 - 记得重新加载 php 服务(我建议也重新启动服务器)