mcrypt CBC 无法访问 www 外部

发布于 2024-11-19 18:13:22 字数 761 浏览 3 评论 0原文

来自新手: 目前正在尝试 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

煮酒 2024-11-26 18:13:22

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文