AFC项目开发文档收拾

WBOY
Release: 2016-06-13 12:17:31
Original
1111 people have browsed it

AFC项目开发文档整理

AFC项目开发文档整理

PHPCMS

的确是一个伟大的CMS,我对它爱不释手。

  • 标签嵌套无法loop获取的解决办法。关键代码如下:

    <code>/\*后台添加\*/$str = preg_replace ( "/\{loop(\S+)\s+(\S+)\s+(\S+)\}/", "<?php \$n\\1=1;if(is_array(\\2)) foreach(\\2 AS \\3) { ?>", $str );$str = preg_replace ( "/\{loop(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\}/", "<?php \$n\\1=1; if(is_array(\\2)) foreach(\\2 AS \\3 =>\\4) { ?>", $str );$str = preg_replace ( "/\{\/loop(\S+)\}/", "<?php \$n\\1++;}unset(\$n\\1); ?>", $str );/\*前台调取\*/{pc:content action="category" catid="0" num="60" siteid="$siteid" order="listorder ASC"}    {loop $data $r}        <dd>        <a href="%7B%24r%5Burl%5D%7D">{$r[catname]}</a>        <ul class="list_ul clearfix">            {pc:content action="category" catid="$r['catid']" num="60" siteid="$siteid" order="listorder ASC" return="data2"}                 {loop2 $data2 $v}            <li>                <a href="%7B%24v%5Burl%5D%7D">{$v[catname]}</a> </li>            {/loop2}            {/pc}        </ul>        </dd>    {/loop}{/pc}</code>
    Copy after login
  • PHPCMS调取会员头像的方法:

    <code>{php $meminfo=get_memberinfo_buyusername($username);$userimg=$meminfo['userid']}<a href="#" class="con_avatar" title="{$username}"><img onerror="this.src='{IMG_PATH}food/autoava.gif'" src="%7Bget_memberavatar(%24userimg,90,90)%7D" alt="{$username}"><span class="avatar_cover"></span></a></code>
    Copy after login

CSS

  • CSS圆角实现

    <code>border: 5px solid #dedede;-moz-border-radius: 15px;      /* Gecko browsers */-webkit-border-radius: 15px;   /* Webkit browsers */border-radius:15px;            /* W3C syntax */</code>
    Copy after login
  • CSS半透明

    <code>filter:alpha(opacity=50);  /*支持 IE 浏览器*/-moz-opacity:0.50; /*支持 FireFox 浏览器*/opacity:0.50;  /*支持 Chrome, Opera, Safari 等浏览器*/</code>
    Copy after login
  • CSS阴影

    <code>box-shadow: 1px 1px 1px 1px #000000;</code>
    Copy after login

PHP

有一个二次检索的需求,需要自己来写。网上给出了2种方法:

  1. 利用StringBuffer
  2. 利用list,将第一次查询的结果放在list中

看了一下,都没有深入研究,最后采用的是AJAX技术。前台组合查询条件,后台得到条件组合查询语句,每次都全新查询。然后更新查询结果显示的方法。这样,“2次”、“3次”、... n次检索都没有问题了。

未完待续。。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!