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

mac2022-06-30  81

如: $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);

 

转载于:https://www.cnblogs.com/hgj123/p/4513716.html

最新回复(0)