wxs77577
- wxs77577 回复了话题 请问上传图片大家都用什么
前两个比较好
- wxs77577 回复了话题 mac 如何配置 yii
mac是unix 跟linux差不多 参考linux
- wxs77577 回复了话题 yii框架如何设置在首页调用多个模块数据
1.可以,不然要yii干嘛。以SiteController为例。在SiteController的actionIndex里面把你要调用的数据先准备好。如:
$news=News::model()->findAll(array('limit'=>11)); $product=Product::model()->findAll(array('limit'=>12)); $(this).render('index',compact('news','product'));
然后在/protected/views/site/index.php
里面粘贴你前端制作出来的HTML页面,css什么的可以放在根目录的一个文件夹里,比如叫/images/。在index.php里面foreach($news as $r)
然后就自由发挥吧。 yii本身的CActiveForm挺好的,够你用的了
额 少了个结束的括号
/protected/config/main.php的'componets'数组里
'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CWebLogRoute', //'levels'=>'profile', //'categories'=>'system.*', //'categories'=>'system.db.CDbCommand,system.caching.*', ),),
/protected/config/main.php
'components'=>array( 'urlManager'=>array( 'showScriptName'=>false, ), ),
yiic过时了,用gii
- wxs77577 回复了话题 请教 ,如何引用一个公用的模板文件?
<?php $this->renderPartial('/public/right'); ?>