当一个变量只能通过引用传递的时候。

如:

$tmplCacheFile = $this->tmplVarReplace(file_get_contents($tmplCacheFile));

 

Strict Standards: Only variables should be passed by reference in /data/opt/mobile_system/lib/cortrol.class.php on line 353

 

 

报错说引用类型不能这样传递。原因是引用类型是用返回值的。所以的用一个变量去接受那个值,在赋值给函数。

 

 

$vcontents = file_get_contents($tmplCacheFile);

$tmplCacheFile = $this->tmplVarReplace($vcontents);






 

posted @ 2015-05-19 09:45  麦田守望者~  阅读(106)  评论(0编辑  收藏  举报