09 2014 档案
摘要:写了一个简单的PHP+jQuery注册模块,需要填写的栏目包括用户名、邮箱、密码、重复密码和验证码,其中每个栏目需要具备的功能和要求如下图:在做这个模块的时候,很大程度上借鉴了网易注册(http://reg.163.com/reg/reg.jsp?product=urs) 的功能和样式。但网易对于每...
阅读全文
摘要:【一、在服务器端配置】安全,PHP代码编写是一方面,PHP的配置更是非常关键。我们php手手工安装的,php的默认配置文件在 /usr/local/apache2/conf/php.ini,我们最主要就是要配置php.ini中的内容,让我们执行 php能够更安全。整个PHP中的安全设置主要是为了防止...
阅读全文
摘要:在模型model文件中,添加public $attributes;即可,$attributes 为要添加的新字段
阅读全文
摘要:1.在写入session的页面。use yii\web\Session;$session = new Session;$session->open();2.在获取session的页面use yii\web\Session;$session = new Session;$session->open()...
阅读全文
摘要:1. view中显示文本域的位置 field($goods_model, 'goods_introduce')->textArea(['class'=>'intr','rows'=>3]) ?>2.要在该文本域中添加默认值,需要在view中设置,不能使用value="",textarea本身没有va...
阅读全文
摘要:本实例是对商品列表进行分页1.Controller中,商品列表的方法actionList 引用分页类 actionList中: $goods_info=Goods::find()->joinWith('brand','category')->orderBy('goods.goods_id desc...
阅读全文
摘要:1.页面视图(我放在了布局文件main.php中): | 显示效果如图:在视图页面添加js代码获取语言设置2.在目录的web/index.php中,获取语言设置$application ->language = isset($_COOKIE['language']) ? htmlspecialcha...
阅读全文