【发布时间】:2014-10-03 08:52:36
【问题描述】:
我有一个带有变量的 file1.php。变量名称未知。 file1.php 使用 ZendGuard 5 加密。所以我无法查看代码。 在 file1.php 中包含 file2.php。我不知道包含 file2.php 的位置,因为 file1.php 已加密。有没有办法在 php 代码中显示未知名称变量?
例子:
file1.php(它将使用 ZendGuard 5 加密)
$my_secret_variable='Hi stackoverflow!';
$my_other_secret_variable_SOME_RANDOM_A4Nf8d3ET='Hi stack!';
include ('file2.php');
file2.php(未加密) 让我们尝试猜测秘密变量的名称和值。
//first attempt
echo'$my_secret';
//second attempt
echo'$my_secret_var';
//etc
有没有办法在 php 代码中显示未知的名称和值变量?
【问题讨论】:
-
我不太确定您要做什么,但我认为 php 中的
$$可能会有所帮助? here -
为什么要在
echo()中引用变量名? (更不用说你实际上用单引号做错了)......
标签: php security zend-guard