首先,我對 PHP 完全陌生,以前從未做過......它的技能為零......但我有一項任務(wù)來解決我工作中的一些錯誤,但我不知道該怎么辦......我這里有錯誤代碼:<?$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);這就是說只有變量應(yīng)該通過引用傳遞。有人可以幫助我嗎?我應(yīng)該如何解決這個問題?
1 回答

慕娘9325324
TA貢獻1783條經(jīng)驗 獲得超4個贊
令人難以置信的是,您的答案確實是正確的。我必須創(chuàng)建變量并將結(jié)果設(shè)置?$tmp = $this->content->getTree(@$node['url'],$lang)
為其。
所有功勞都歸于IncredibleHat
- 1 回答
- 0 關(guān)注
- 163 瀏覽
添加回答
舉報
0/150
提交
取消