$this->is('index') //首页
$this->is('archive') //归档
$this->is('category') //分类栏目
$this->is('tag') //标签
$this->is('date') //日期归档页
$this->is('single') //内容页
$this->is('post') //内容页
$this->is('page') //独立页面
$this->is('attachment') //附件
$this->is('category','cat_sl...
本站文章 85 篇,分类 5 个,标签 58 个,评论 1 条。
Typecho 分页和上下篇函数调用

分页
<?php $this->pageLink('下一页','next'); ?>
<?php $this->pageLink('上一页'); ?>
<?php $this->pageNav('上一页', '下一页', '5', '……'); ?>
<?php $this->pageNav('Newer', 'Older', 1, '...', array('wrapTag' => 'nav', 'wrapClass' => 'page-nav', 'itemTag' => '', 'prevClass...
Apache,Nginx 设置 typecho 伪静态去除 index.php

Apache 下设置 typecho 伪静态
设置 - 永久链接 - 启用地址重写功能
网站根目录 创建 .htaccess 文件,粘贴
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
Nginx ...
PHP 过滤所有中英文标点

/** 过滤中英文标点符号 */
function filter_punctuation($text){
$text=urlencode($text);
$text=preg_replace("/(%E3%80%82|%EF%BC%9F|%EF%BC%81|%EF%BC%8C|%E3%80%81|%EF%BC%9B|%EF%BC%9A|%E2%80%9C|%E2%80%9D|%E2%80%98|%E2%80%99|%EF%BC%88|%EF%BC%89|%E3%80%8A|%E3%80%8B|%E3%80%88|%E3%80%89|%E3%80%90|%E3%80%91|...
欢迎使用 Typecho

如果您看到这篇文章,表示您的 blog 已经安装成功.
最新评论