【问题标题】:PHP-7.1.6 - enable with security.limit_extensions .shtml files?PHP-7.1.6 - 启用 security.limit_extensions .shtml 文件?
【发布时间】:2017-12-17 21:14:05
【问题描述】:

如何在 PHP-7.1.6 中启用,设置“security.limit_extensions”,执行 .shtml 文件?我收到错误“访问脚本'/var/www/..../file.shtml'已被拒绝(请参阅security.limit_extensions)”file.shtml 如下

<?php include ("web.php"); ?>

【问题讨论】:

  • 编辑您的 PHP 配置。如果您别无选择,那是您的主机的问题。重命名文件或移动主机。

标签: php-7.1 shtml


【解决方案1】:

1 - 找到 php 配置文件

php-fpm.conf

2 - 编辑 security.limit_extensions 行,将 .shtml 添加到其中。

security.limit_extensions = .php .html .shtml

3 - 如果该行不存在,仍然添加到文件中

4 - 记得重新加载 php 服务(我建议也重新启动服务器)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-24
    • 2011-08-24
    • 2023-03-03
    • 2012-07-17
    • 1970-01-01
    • 2017-12-25
    • 1970-01-01
    相关资源
    最近更新 更多