cakephp controller 加载不相同的 model

摘要: 1. Controller::loadModel();This method actually calls ClassRegistry::init() and saves the instance of the model as a parameter in the controller.Example:1Controller::loadModel('Car');2$cars=$this->Car->find('all');2. ClassRegistry::init()This method creates an instance of the M 阅读全文
posted @ 2012-07-03 18:40 一个石头 阅读(168) 评论(0) 推荐(0)

php 数组操作的基本函数

摘要: 一、数组操作的基本函数数组的键名和值array_values($arr);获得数组的值array_keys($arr);获得数组的键名array_flip($arr);数组中的值与键名互换(如果有重复前面的会被后面的覆盖)in_array("apple",$arr);在数组中检索applearray_search("apple",$arr);在数组中检索apple ,如果存在返回键名array_key_exists("apple",$arr);检索给定的键名是否存在数组中isset($arr[apple]):检索给定的键名是否存在数组 阅读全文
posted @ 2012-07-03 18:38 一个石头 阅读(165) 评论(0) 推荐(0)

从此以后,我不再使用百度空间了。

摘要: 百度空间,伴随着我很多年了,让我的生活更加精彩。百度空间,我等了很多年,他都没有在编辑器添加“插入代码”功能,这是作为一个程序不可忍受的事情。百度空间,第一次需要查找文章时,他总是先把我带到一个类似微博的主页里。百度空间,现在竟然变成了轻微博。。。。从此以后,我不再使用百度空间了。 阅读全文
posted @ 2012-07-03 18:31 一个石头 阅读(165) 评论(0) 推荐(0)