1、
有些全局变量可以在view使用,使用img、js里面的文件都有
<?php echo $html->image($p['Product']['thumb_url'],array('onclick'=>$remoteFunction));?>
所以如要使用,请网$html的helpers查找方法。
2、 Session的读写很简单,$this->Session->write('lang',0);$lang = $this->Session->read('lang');
3、 $this->render($view,$layout),进行调用其他view。
本文详细介绍了在PHP中如何在view中使用全局变量、image函数及js文件,并提供了简单明了的Session读写方法。
&spm=1001.2101.3001.5002&articleId=7270726&d=1&t=3&u=5ed59c225c4e470a81c45fefcde56b75)
2221

被折叠的 条评论
为什么被折叠?



