复制代码 代码如下:
file_get_contents('shadow.xml');
耗时 0.0003 秒
复制代码 代码如下:
$indexfile = fopen('shadow.xml', 'r');while ( !feof($indexfile)) fgetc( $indexfile);
耗时 0.026 秒
复制代码 代码如下:
$indexfile = fopen('shadow.xml', 'r');fread($indexfile, 10000);
耗时 0.0003秒
相差将近 100 倍!! 还真是出乎意料
我估摸着时间怕都牺牲在while循环上还是怎的
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!