脚本宝典收集整理的这篇文章主要介绍了php – 致命错误:无法在写入上下文中使用函数返回值,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
码:
<div> <div class=""> <input tyPE="text" id="select_shelves" name="select_shelves" class="shelves_select_and_buttons" /> <div id="shelves_menu" > <ul> <li id="li_" onclick="PRintValue();">option5 <= line 142 </li> </ul> </div> </div> <div class="button"> <input type="button" onclick="dropShelves();" id="Shelves_select_button" name="Shelves_select_button" value="" class="grey_button"/> </div> </div>
if(empty($var = getMyVar())) { ... }
而不是这个你应该这样称呼它:
$var = getMyVar(); if(empty($var)) { ... }
或者更好(正如deceze指出的那样)
if(!getMyVar()) { ... }
问题还会导致其他类似的函数(isset,is_a,is_null等).
以上是脚本宝典为你收集整理的php – 致命错误:无法在写入上下文中使用函数返回值全部内容,希望文章能够帮你解决php – 致命错误:无法在写入上下文中使用函数返回值所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。