比如在一个文件中.有这一句
include_once $db_Patch.'public/db/mysql.config.php';
通过打印知道,$db_Patch的目录中d:/www/
所以,文件绝对路径为’d:/www/public/db/mysql.config.php’;
然后打印mysql.config.php中的内容,方法为
先建立一个php文件, 里面内容为
<pre class="hljs"><code class="php">
<?php
$file = "D:/www/public/db/mysql.config.php";
echo htmlentities(file_get_contents($file));
?>
</code></pre>
然后,把新建立的这个文件上传到对应服务器.直接打开即可打印.