当一个变量只能通过引用传递的时候。
生活随笔
收集整理的這篇文章主要介紹了
当一个变量只能通过引用传递的时候。
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
如:
$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
?
?
報(bào)錯(cuò)說(shuō)引用類型不能這樣傳遞。原因是引用類型是用返回值的。所以的用一個(gè)變量去接受那個(gè)值,在賦值給函數(shù)。
?
?
$vcontents = file_get_contents($tmplCacheFile);
$tmplCacheFile = $this->tmplVarReplace($vcontents);
?
總結(jié)
以上是生活随笔為你收集整理的当一个变量只能通过引用传递的时候。的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: [再寄小读者之数学篇](2014-11-
- 下一篇: POJ 1252 Euro Effici