1.先搞懂每个文件;文件里的每个模块,每个类是干嘛的.
2.找到程序的入口与出口.
3.一步步分析从入口到出口
方法:在程序中加入 打印语句 写入文件语句 及 下载文件语句 等进行输出,达到分析程序流程的目的.
打印语句:
echo print_r 等.
写入文件语句:
$fp = fopen('output.txt', 'a+');
fwrite($fp, $value);
$flag = "\n\n--------------------------------\n\n";
fwrite($fp, $flag);
fclose($fp);
等.
下载文件语句:
header("Content-type: text/directory");
header("Content-Disposition: attachment; filename=" . "ok" . ".text" . "");
header("Pragma: public");
print $value;