register_globals 同 magic_quotes_gpc 因为其安全问题已经臭名远播。
所以一般主机提供商,禁用了 register_globals 同 magic_quotes_gpc 并默认设置为 "off",可以到php.ini设置。【不建议】
其实使用 .htaccess 就可以开启。
在 .htaccess 加入两句就可以开启 register_globals 同 magic_quotes:
php_flag register_globals on
php_flag magic_quotes_gpc on
在 .htaccess 加入两句就可以关闭 register_globals 同 magic_quotes:
php_flag register_globals off
php_flag magic_quotes_pc off
原文:http://www.francissoung.com/biancheng/228.html
参考:http://www.ismarthost.com/bill/knowledgebase.php?action=displayarticle&id=316
以上就介绍了利用 htaccess 打开 / 关闭 register_globals 及 magic_quotes_gpc,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号