smarty模板引擎之if, elseif else

Smarty 中的 if 语句和 php 中的 if 语句一样灵活易用,并增加了几个特性以适宜模板引擎. if 必须于 /if 成对出现. 可以使用 else 和 elseif 子句. 可以使用以下条件修饰词:eq、ne、neq、gt、lt、lte、le、gte、ge、is even、is odd、is not even、is not odd、not、mod、div by、even by、odd by、==、!=、>、<、<=、>=. 使用这些修饰词时必须和变量或常量用空格格开。

Read More

解决apache启动错误 AH00558: httpd: Could not reliably determine

[root@localhost httpd-2.4.7]# /usr/local/httpd/bin/apachectl start

AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName’ directive globally to suppress this message

apache 启动出现这种错误的解决方法:

将 apache 的配置文件httpd.conf中的 ServerName 改成可用域名或如下配置

ServerName localhost:80

安装Apache提示APR not found的解决办法

#./configure --prefix……检查编辑环境时出现:

checking for APR… no
configure: error: APR not found . Please read the documentation.

可以用./configure -help | grep apr 查看帮助。
--with-included-apr Use bundled copies of APR/APR-Util
--with-apr=PATH prefix for installed APR or the full path to apr-config
--with-apr-util=PATH prefix for installed APU or the full path to

Read More

phpcms文件结构

主要目录部分

/admin 管理后台目录
– /skin/ 后台样式
– /templates/ 后台样式模板

/api api接口

/corpandresize 在线图片处理
– /css/ csss样式
– /images/ 图片
– /js/ 引用js文件
– /tmp/ 临时文件

Read More