趁着缓存路径下的临时文件并未失效,将default_index_html.php的代码插入var_dump函数来输出$_obj变量:
<?php include_once "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/blog/class/templateExtensions/stripslashes.php"; include_once "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/blog/class/templateExtensions/datetime.php"; include_once "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/blog/class/templateExtensions/origin.php"; var_dump($_obj); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title><?php echo phpsay_stripslashes($_obj['blogConfig']['sitename']); ?> </title><meta content="<?php echo phpsay_stripslashes($_obj['blogConfig']['keywords']); ?>......
执行该网页之后,在Chrome里查看网页源文件:
array(7) { ["blogConfig"]=> array(17) { ["version"]=> float(1.2) ["skin"]=> string(7) "default" ["url_short"]=> bool(false) ["per_blog"]=> int(20) ["comment_open"]=> int(2) ["per_comment"]=> int(20) ["nickname"]=> string(6) "phpsay" ["timezone"]=> string(14) "Asia/Hong_Kong" ["sitename"]=> string(9) "Microblog" ["siteurl"]=> string(21) "http://localhost/blog" ["siteintro"]=> string(0) "" ["keywords"]=> string(16) "phpsay,microblog" ["miibeian"]=> string(0) "" ["description"]=> string(0) "" ["tracking_code"]=> string(0) "" ["pic_upload"]=> string(16) "_static/picture/" ["avatar_upload"]=> string(15) "_static/avatar/" } ["loginStat"]=> int(0) ["thisPage"]=> int(1) ["blogArr"]=> array(2) { ["Total"]=> string(1) "5" ["Blog"]=> array(5) { [0]=> array(7) { ["mid"]=> string(1) "5" ["message"]=> string(3) "///" ["picture"]=> string(0) "" ["piclink"]=> string(0) "" ["dateline"]=> string(10) "1293779783" ["origin"]=> string(3) "Web" ["comments"]=> string(1) "0" } [1]=> array(7) { ["mid"]=> string(1) "4" ["message"]=> string(15) "分享图片ttt" ["picture"]=> string(29) "2010/12/31/s_151533_24087.jpg" ["piclink"]=> string(29) "2010/12/31/b_151533_24087.jpg" ["dateline"]=> string(10) "1293779742" ["origin"]=> string(3) "Web" ["comments"]=> string(1) "1" } [2]=> array(7) { ["mid"]=> string(1) "3" ["message"]=> string(88) "d - Digits (0-9)D - Any non digit character. - (Period) – Any character except newline" ["picture"]=> string(0) "" ["piclink"]=> string(0) "" ["dateline"]=> string(10) "1293779665" ["origin"]=> string(3) "Web" ["comments"]=> string(1) "1" } [3]=> array(7) { ["mid"]=> string(1) "2" ["message"]=> string(96) "W - Any non “word” characters - Whitespace (space, tab CRLF)S - Any non whitepsace character" ["picture"]=> string(0) "" ["piclink"]=> string(0) "" ["dateline"]=> string(10) "1293779661" ["origin"]=> string(3) "Web" ["comments"]=> string(1) "0" } [4]=> array(7) { ["mid"]=> string(1) "1" ["message"]=> string(81) "PHP REGEX CHEAT SHEET Special Sequences /w - Any “word” character (a-z 0-9 _)" ["picture"]=> string(0) "" ["piclink"]=> string(0) "" ["dateline"]=> string(10) "1293779601" ["origin"]=> string(3) "Web" ["comments"]=> string(1) "0" } } } ["blogDay"]=> string(1) "0" ["blogWeek"]=> string(1) "0" ["pageArr"]=> array(6) { ["pageTotal"]=> float(1) ["pagePre"]=> string(0) "" ["pageFirst"]=> string(0) "" ["pageList"]=> string(0) "" ["pageLast"]=> string(0) "" ["pageNext"]=> string(0) "" } }