(一)WordPress基本模板文件,一套完整的WordPress模板包括如下文件,但是只有 index.php和style.css是不能缺少的: style.css : CSS(样式表)文件,不可缺少版权部分,真正CSS样式表可以放在其他文件; index.php : 主页模板,不可缺少;
PHP <?php class Jmail { public $Username; //邮局用户名 public $Password; //密码 public $FormName ; //发件人姓名 public $From ; //发件人地址 public $Addrecipient ; //收件人地址 public $Ttile ; //邮件标题 public $Content ; //邮件内容 public $Smtp; //邮件服务器 function Send(){ $Jmail = new com("Jmail.Message"); //实例化一个Jmail对象 $Jmail->SiLent=true; //设置成True的话Jmail不会提示错误只会返回True和False [...]
1.首先并在ucenter中添加应用,其中通信密钥随便输入,复制下来。 2.在wordpress目录中放一个uc_client文件夹,这个文件夹可以从ucenter相关的包中得到,是所有客户应用都会用到的。 3.更改wordpress配置文件wp-config.php,在其中加类似如下代码(请自行修改加粗部分):
显示或返回页面的标题。可以自定义分隔符号,并且从2.5版本开始,分隔符号可以定义显示在标题的前面还是后面。 这个标签可以用在模板主循环(loop)外的任何地方,然而特别是用在页面头部的<title> 元素里。
最近尝试Dreamweaver和editplus之类的编辑器里的正则替换功能,其实蛮有效的 匹配中文字符的正则表达式: [\u4e00-\u9fa5] 评注:匹配中文还真是个头疼的事,有了这个表达式就好办了,在 Dreamweaver 里可以直接用这个替换中文文字
常常在用,常常反复查,哎,记录一下吧! 服务器变量 $_SERVER : 1、$_SERVER['PHP_SELF'] — 获取当前正在执行脚本的文件名
升级到wordpress3.0之后,会发现多了一些功能,其中一个是在 “外观”下多了个 Menus 选项。点开后你会发现一个提示 “The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.” 意思是这个主题不支持这个功能,但是你可以在 小工具里使用“Custom Menu”在 sidebar 里实现。 通过 register_nav_menus( $locations = array() ); 可以激活该功能。 例如 if ( function_exists( 'register_nav_menus' ) ) { register_nav_menu( array( 'location_1' => [...]
Description Displays information about your blog, mostly gathered from the information you supply in your User Profile and General Options from the WordPress Administration panels (Settings → General). It can be used anywhere within a page template. This always prints a result to the browser. If you need the values for use in PHP, use [...]
http://www.we-globe.net/WebLab/Download/DmozRdf2MySQL.html 这儿吧 dmoz rdf 已经转换成MYSQL文件了,下载下来按说明导入即可。
literal 在模板中使用 literal ,其对象的数据将被当作文本处理,此时模板将忽略其内部的所有字符信息,此特性用于显示有可能包含 {} 等字符信息的 javascript 脚本。 literal 使用格式 {literal} <script language=javascript> ... </script> {/literal} strip 去除标记中数据的首尾空格与回车。用法一样,会把这对标签中的代码查看源代码时候显示在一行里,貌似有点儿像代码压缩,但是不知道是不是有这个效果。










