php - 如何解决这个 PHP 错误“只有变量应该通过引用传递”?
问题描述
首先,我对 PHP 完全陌生,以前从未这样做过.. 零技能.. 但我的任务是解决我工作中的一些错误,但我不知道该怎么办..
我这里有错误
代码:
<?$this->box->begin('rdgrey rdopen',null,'tree')?>
<?$this->box->headbegin();?>
<span class="title"><?=lang('site_tree')?> </span>
<?$this->box->headend();?>
<?$this->box->contentbegin('');?>
<?
function pr(&$list,$key,&$c){
echo '<ul class="tree">';
$l=count(@$list[$key]);
$i=0;
if($l)
foreach($list[$key] as $k=>$v){
$has = count(@$c->content->config['has'][$v['type']]);
echo '<li class="',($k==$l-1?'last ':''),(count(@$c->content->config['has']
[$v['type']])?'folder ':'file ' ),
(isset($list[$v['url']])?'open ':''),'type_',($v['type']),'">
<span onClick="tree_tog(this)"></span><a href="',site_url('panel/'.
($has?'index':'edit').'/'.$v['lang'].'/'.$v['nid'],null,false),'">
',character_limiter($v['name'],40),'</a>';
if($v['type']!='root'&&isset($list[$v['url']]))
pr($list,$v['url'],$c);
echo '</li>';
}
//if($key)
//echo '<li class="last"><a href="" onClick="return tognode(\'',$key,'\',this)">+</a></li>';
echo '</ul>';
}
$lang = isset($_GET['lang']) ? $_GET['lang'] : @$node['lang'];
pr($this->content->getTree(@$node['url'],$lang),'/',$this);
?>
<?$this->box->contentend();?>
<?$this->box->end()?>
这条线有问题
pr($this->content->getTree(@$node['url'],$lang),'/',$this);
它是说只有变量应该通过引用传递。
有人可以帮助我吗?我应该如何解决这个问题?
解决方案
IncredibleHat确实您的回答是正确的。我必须创建变量并将此结果设置
$tmp = $this->content->getTree(@$node['url'],$lang)
为它。
所有功劳归于IncredibleHat
推荐阅读
- java - 如何使用 BeforeTest 执行多次运行 TestNG 测试?
- typescript - 打字稿避免交叉路口中可空值的重复类型
- python - 凭证 JSON 文件到谷歌 colab
- sql-server-2008 - 问题:无法加载文件或程序集 'CrystalDecisions.Web,版本 = 13.0.3500.0
- postgresql - 如何在 postgreSQL 中实现物化视图的 MVCC 概念?
- python - SPSS 22 中的 Numpy
- python - 蟒蛇 | UnicodeEncodeError:“charmap”编解码器无法在位置 1 编码字符“\u0119”:字符映射到
- ads - 带有谷歌网页设计器的 HTML5 横幅不显示恢复服务器上的点击次数
- dataframe - 如何重塑、分组和重命名 Julia 数据框?
- java - 模块化java项目(IntelliJ IDEA):模块“com.test”从“java.xml.bind”和“java.xml.bind”读取包“javax.xml.bind”