TypechoJoeTheme

Dcr163的博客

统计
搜索到 308 篇与 日志 的结果
2015-10-18

phpcms v9 如何在列表页和内容页调用子栏目的目录

phpcms v9 如何在列表页和内容页调用子栏目的目录
首先我们知道,每一个栏目都会有这样的三个文件,它们分别是栏目页category.html,列表页list.html,和内容页show.html 具体调用子栏目目录名的方法是: 在栏目首页(category.html)用下面的标签代码进行调用: {loop subcat($catid) $r}<a href="{$r[url]}" title="{$r[catname]}">{$r[catname]}</a>{/loop} 在列表页(list.html)和内容页(show.html)用下面的标签代码进行调用: {loop subcat($catid) $r}<a href="{$CATEGORYS[$r[catid]][url]}">{$CATEGORYS[$r[catid]][catname]}</a>{/loop} 注:上面的{loop subcat($catid) $r} 里面的$catid换上父栏目的ID号。
2015-10-18

日志

761 阅读
0 评论
2015年10月18日
761 阅读
0 评论
2015-10-18

PHP面向对象 __construct方法使用

PHP面向对象 __construct方法使用
// 构造方法,在new一个对象的时候,就会立刻自动调用__construct()这个函数class Humen{public $name;public $age; function __construct($name,$age){$this->name=$name;$this->age=$age;} function say(){echo "我叫{$this->name},我今年{$this->age}岁了!!<br/>";} }$a=new Humen('小红','44');$a->say();$b=new Humen('小明','18');$b->say();
2015-10-18

日志

702 阅读
0 评论
2015年10月18日
702 阅读
0 评论
2015-10-18

php ODP预处理机制笔记

php ODP预处理机制笔记
//php 预处理机制header('content-type:text/html;charset=utf-8');$pdo=new PDO("mysql:host=localhost;dbname=blong","root","root"); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC); $pdo->exec("set names utf8"); /* $sql="delete from v9_yuyue where id=?";$arr=arry(1,3,4,5);foreach($arr as $val){$obj=$pdo->prepare($sql);$obj->bindValue(1,$val);} */$sql2="insert into v9_yuyue(name,sex,age,content) v...
2015-10-18

日志

793 阅读
0 评论
2015年10月18日
793 阅读
0 评论
2015-10-18

JS获取浏览器和屏幕的宽高

JS获取浏览器和屏幕的宽高
//获取浏览器文档区的宽高var htmlw=document.documentElement.clientWidth;var htmlh=document.documentElement.clientHeight;//返回顶部代码window.onscroll=function(){var winScrollH=document.documentElement.scrollHeight;//总高度var winClientH=document.documentElement.clientHeight;//可视高度var winScrollTop=document.documentElement.scrollTop;//滚动高度
2015-10-18

日志

721 阅读
0 评论
2015年10月18日
721 阅读
0 评论
2015-10-18

linux nginx虚拟机主机,禁止某个IP配置

linux nginx虚拟机主机,禁止某个IP配置
把这段代码放到nginx安装目录配置文件nginx.conf,http{}中,不能放在默认server{}中,否则会报错,或服务失败,静止某个IP和某段IP也是放在自己的虚拟主机配置下server {listen       80;server_name    www.php.com;                                   #这个www.php.com是自己的域名index index.html index.htm index.php;root  /home/free/nginx/www/www_php_com;        #这个是这个域名所对应的安装目录         location ~ \.php$ {  &nbs...
2015-10-18

日志

807 阅读
0 评论
2015年10月18日
807 阅读
0 评论

人生倒计时

今日已经过去小时
这周已经过去
本月已经过去
今年已经过去个月

最新回复

  1. William Tardent
    2024-02-27
  2. Maryann Hamer
    2024-02-27
  3. Sanora Pantano
    2024-02-24
  4. aa
    2024-02-21
  5. Kassie Baum
    2024-01-28

标签云