mcrypt CBC 无法访问 www 外部
来自新手: 目前正在尝试 mcrypt CBC。
我没有问题让recall.mcrypt.php调用同一目录中的mcrypt.php文件,但由于最佳实践和安全需求,我将mcrypt.php放置在目录之外,使用:
$file = fopen("/opt/lampp/test.mcrypt/mcrypt.php","r");
这样做时,我得到以下内容错误:
Fatal error: Class 'phpFreaksCrypto' not found in /opt/lampp/htdocs/CCS/mcrypt/recall.mcrypt.php on line 6
mcrypt.php
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME']))
{
// tell people trying to access this file directly goodbye...
exit('This file can not be accessed directly...');
}
class phpFreaksCrypto
{
// content is located here
}
mcyrpt.php 的设置已设置为读取。也许我的困惑在于 fopen,即使我认为这个命令就是用于这个目的,或者是否有一个命令可以在这种情况下更好地回忆 mcyrpt.php。
欢迎所有见解和建议。谢谢。
From a novice:
In currently experimenting with mcrypt CBC.
I have no issues getting recall.mcrypt.php to recall mcrypt.php file inside the same directory but because of best practices and security needs, I'm placing mcrypt.php outside the directory using:
$file = fopen("/opt/lampp/test.mcrypt/mcrypt.php","r");
In doing so I'm getting the following error:
Fatal error: Class 'phpFreaksCrypto' not found in /opt/lampp/htdocs/CCS/mcrypt/recall.mcrypt.php on line 6
mcrypt.php
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME']))
{
// tell people trying to access this file directly goodbye...
exit('This file can not be accessed directly...');
}
class phpFreaksCrypto
{
// content is located here
}
The settings for mcyrpt.php have been set to read. Maybe my confusion lies in fopen even though I thought this command is used for this very purpose or is there a command that better recalls mcyrpt.php in this type of situation.
All insights and suggestions are welcome. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
mcrypt.php 来自哪里?为了包含 .php 文件以获得该文件中的附加功能,您必须使用 include、require 等语句。
这是您想要做的吗?
Where is mcrypt.php comming from? In order to include a .php file for additional functionality from this file you will have to use the statements include, require etc.
Is this what you want to do?