<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jacky's BLOG &#187; php</title>
	<atom:link href="http://jk.scanmon.com/en/wp/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://jk.scanmon.com/en</link>
	<description>The pursuit of excellence, become an excellent system administrator!</description>
	<lastBuildDate>Fri, 29 Apr 2011 03:22:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>smarty and php system variables</title>
		<link>http://jk.scanmon.com/en/wp/2009/12/smarty%e5%8f%8aphp%e7%b3%bb%e7%bb%9f%e5%8f%98%e9%87%8f.html</link>
		<comments>http://jk.scanmon.com/en/wp/2009/12/smarty%e5%8f%8aphp%e7%b3%bb%e7%bb%9f%e5%8f%98%e9%87%8f.html#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:20:00 +0000</pubDate>
		<dc:creator>jacky</dc:creator>
				<category><![CDATA[English Version]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jk.scanmon.com/?p=1691</guid>
		<description><![CDATA[

{* 显示URL中的page值（$_GET）http://www.example.com/index.php?page=foo *}
{$smarty.get.page}
{* 显示来自一个表单的&#8221;page&#8221;变量（$_POST['page']）*}
{$smarty.post.page}
{* 显示COOKIE变量&#8221;username&#8221;的值（$_COOKIE['username']）*}
{$smarty.cookies.username}
{* 显示服务器变量&#8221;SERVER_NAME&#8221;（$_SERVER['SERVER_NAME']）*}
{$smarty.server.SERVER_NAME}
{$smarty.server.PHP_SELF}
{$smarty.server.SCRIPT_NAME}
{* 显示系统环境变量&#8221;PATH&#8221; *}
{$smarty.env.PATH}
{* 显示PHP会话变量&#8221;id&#8221;（$_SESSION['id']）*}
{$smarty.session.id}
{* 显示变量&#8221;username&#8221;，不论来自get/post/cookies/server/env *}
{$smarty.request.username}
$smarty}保留变量可以被用于访问一些特殊的模板变量，以下是全部页面请求变量。
以 下是访问页面请求变量诸如get,post,cookies,server,enviroment和session变量的例子. 例如{$smarty.server.SERVER_NAME}取得服务器变量，{$smarty.env.PATH}取得系统环境变量path, 　　　　　　   {$smarty.request.username}取得get/post/cookies/server/env的复合变量。
{$smarty.now}变量用于访问当前时间戳.
可以用 date_format调节器格式化输出. 例如{$smarty.now&#124;date_format:&#8221;%Y-%m-%d %H:%M:%S&#8221;}
{$smarty.const}
你可以直接访问PHP常量. 例如{$smarty.const._MY_CONST_VAL}
{$smarty.capture}
可以通过{capture}..{/capture}结构 截取的输出可以使用{$smarty} 变量访问.
{$smarty.config}
{$smarty}变量 可以访问已经加载的config变量.
例如 {$smarty.config.foo}就可以表示 {#foo#}.
{$smarty.section}, {$smarty.foreach}
{$smarty} 变量可以访问&#8217;section&#8217;和&#8217;foreach&#8217;循环的属性.
{$smarty.template}
显示当前被处理的模板的名字.
{$smarty.version}
显示smarty模板的版本
{$smarty.ldelim}
显示左分隔符
{$smarty.rdelim}
显示右分隔符$smarty}保留变量可以被用于访问一些特殊的模板变量，以下是全部页面请求变量。
以 下是访问页面请求变量诸如get,post,cookies,server,enviroment和session变量的例子. 例如{$smarty.server.SERVER_NAME}取得服务器变量，{$smarty.env.PATH}取得系统环境变量path, 　　　　　　   {$smarty.request.username}取得get/post/cookies/server/env的复合变量。
{$smarty.now}变量用于访问当前时间戳.
可以用 date_format调节器格式化输出. 例如{$smarty.now&#124;date_format:&#8221;%Y-%m-%d %H:%M:%S&#8221;}
{$smarty.const}
你可以直接访问PHP常量. 例如{$smarty.const._MY_CONST_VAL}
{$smarty.capture}
可以通过{capture}..{/capture}结构 截取的输出可以使用{$smarty} 变量访问.
{$smarty.config}
{$smarty}变量 可以访问已经加载的config变量.
例如 {$smarty.config.foo}就可以表示 {#foo#}.
{$smarty.section}, {$smarty.foreach}
{$smarty} 变量可以访问&#8217;section&#8217;和&#8217;foreach&#8217;循环的属性.
{$smarty.template}
显示当前被处理的模板的名字.
{$smarty.version}
显示smarty模板的版本
{$smarty.ldelim}
显示左分隔符
{$smarty.rdelim}
显示右分隔符
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
PHP获取当前url路径的函数及服务器变量:
代码如下：
&#60;?php
echo $_SERVER['DOCUMENT_ROOT'].&#8221;&#60;br&#62;&#8221;; //获得服务器文档根变量
echo $_SERVER['PHP_SELF'].&#8221;&#60;br&#62;&#8221;; //获得执行该代码的文件服务器绝对路径的变量
echo __FILE__.&#8221;&#60;br&#62;&#8221;; //获得文件的文件系统绝对路径的变量
echo dirname(__FILE__); //获得文件所在的文件夹路径的函数
?&#62;
//server函数
$_SERVER["HTTP_REFERER"]=http://localhost/lianxi/
$_SERVER["HTTP_ACCEPT_LANGUAGE"]=zh-cn
$_SERVER["HTTP_ACCEPT_ENCODING"]=gzip, deflate
$_SERVER["HTTP_USER_AGENT"]=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT [...]]]></description>
		<wfw:commentRss>http://jk.scanmon.com/en/wp/2009/12/smarty%e5%8f%8aphp%e7%b3%bb%e7%bb%9f%e5%8f%98%e9%87%8f.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx+php+fpm+apc=awesome</title>
		<link>http://jk.scanmon.com/en/wp/2009/12/nginxphpfpmapcawesome.html</link>
		<comments>http://jk.scanmon.com/en/wp/2009/12/nginxphpfpmapcawesome.html#comments</comments>
		<pubDate>Thu, 24 Dec 2009 07:49:08 +0000</pubDate>
		<dc:creator>jacky</dc:creator>
				<category><![CDATA[English Version]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jk.scanmon.com/?p=1608</guid>
		<description><![CDATA[
The following guide will walk you through setting up possibly the fastest way to serve PHP known to man. If there is a faster way, I’ve not yet found it climbing through zillions of blog posts out there on the subject. In this article, we’ll be installing nginx http server, PHP with the PHP-FPM patches, [...]]]></description>
		<wfw:commentRss>http://jk.scanmon.com/en/wp/2009/12/nginxphpfpmapcawesome.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

