原来以为thinkPHP的 model 就和PHPCMS一样 就起到一个连接数据库的作用,今天看了视频,才发现这个也是 mvc中的m使用方法可以使用 D() 方法下面是 UserControllerdisplay(); } /**-- 登陆页面 --**/ public function lo...
分类:
Web程序 时间:
2014-10-14 19:27:19
阅读次数:
250
1.初始化数据库;postgresql-setup initdb2.启动postgresql并设置为开机自启动;systemctl restart postgresqlsystemctl enable postgresql3.登进数据库看看状态;(可略)su - postgrespsql\du (查...
分类:
数据库 时间:
2014-10-13 19:02:27
阅读次数:
303
cd/usr/local/src
wgethttp://nginx.org/download/nginx-1.7.6.tar.gz
tar–xvfnginx-1.7.6.tar.gz
cdnginx-1.7.6
./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-pcre
makemakeinstall
vi/usr/local/nginx/conf/nginx.con..
分类:
Web程序 时间:
2014-10-13 17:47:30
阅读次数:
552
今天用PHPCMS做一项目时,需要实现在首页调用全站文章的需求,但是PHPCMS没有现成的标签可以拿来用,看了下默认的首页模板,有这么一段代码:{pc:contentaction="hits"catid="6"num="10"order="viewsDESC"}{loop$data$r}<li><ahref="{$r[url]}"target="_blank">{$r..
分类:
其他好文 时间:
2014-10-13 12:06:29
阅读次数:
157
转自: http://www.upxinyuan.com/wangzhanjiaocheng/233_1.html?jdfwkey=76j463*** 根据box类型字段获取显示名称* @param $field 字段名称* @param $value 字段值* @param $modelid 字段...
分类:
Web程序 时间:
2014-10-12 12:26:27
阅读次数:
263
1.修改数据库v9_collection_node,增加两个字段replace_from,replace_to(varchar(200))2./phpcms/modules/collection/templates/node_form.tpl.php第99行后增加网址替换: "/>替换为 "/>.....
分类:
Web程序 时间:
2014-10-11 19:59:36
阅读次数:
266
跟TP、CI框架不同,phpcmsv9分配变量的方式是:控制器中声明了变量$a='zrp'或$data=array('aa','bb');在模板中就可以直接输出:字符串:{$a}数组:遍历{loop $data $key $val} {$val}{/loop}
分类:
Web程序 时间:
2014-10-11 18:44:15
阅读次数:
201
安装完centos7minimal后,无力吐槽,变化之大,发现以前常用的一些命令都没有。一、常用命令安装查看anaconda-ks.cfg,原来是没装basegroup的包[root@centos7~]#catanaconda-ks.cfg
#version=RHEL7
#Systemauthorizationinformation
auth--enableshadow--passalgo=sha512
#UseC..
分类:
其他好文 时间:
2014-10-11 18:26:46
阅读次数:
225
方法一:主要在于是否开启gd库 查看办法 找到php.ini文件 搜索extension=php_gd2.dll这段代码 然后把前面的;符号去掉即可。方法二:关键一点是获取验证码的图片与全局变量SITE_URL相关,也就是网站的目录,所以只要修改cache/configs/system.php文件中...
分类:
Web程序 时间:
2014-10-11 15:02:45
阅读次数:
206