<?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>เทคนิคการเขียนเว็บ เขียนโปรแกรม php คัดมา เน้น ๆ : webshowpow.com &#187; code</title>
	<atom:link href="http://www.webshowpow.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webshowpow.com</link>
	<description>เทคนิคการเขียนเว็บ เขียนโปรแกรม php คัดมา เน้น ๆ</description>
	<lastBuildDate>Thu, 01 Dec 2011 10:20:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>แก้ไขปัญหา ?fb_xd_fragment=</title>
		<link>http://www.webshowpow.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-fb_xd_fragment/</link>
		<comments>http://www.webshowpow.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-fb_xd_fragment/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 08:24:02 +0000</pubDate>
		<dc:creator>แว่นตก</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fb]]></category>
		<category><![CDATA[fb_xd_fragment]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[แก้ไข]]></category>

		<guid isPermaLink="false">http://www.webshowpow.com/?p=129</guid>
		<description><![CDATA[เมื่อไม่นานมานี้ ผมได้เข้า google analytics แล้วพบว่า มี url เพิ่มเข้ามา คือ mysite.com/?fb_xd_fragment= ผมก็ลองคลิกดู ซึ่งพบว่า มันแสดงหน้าเปล่า แต่พอ view source ก็ยังมีข้อมูลเวปอยู่ แสดงว่ามันต้องมีของแน่เลย วิชาเวปไซด์หายตัว  ยังมีข้อมูลอยู่นะแต่มองไม่เห็น  เหอะ ๆ &#160; เอาวิธีแก้ไขเลยดีกว่า เอา code ด้านล่าง ไปใส่ด้านล่างของเวปไซด์ก่อน tag &#60;/body&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>เมื่อไม่นานมานี้ ผมได้เข้า google analytics แล้วพบว่า มี url เพิ่มเข้ามา คือ mysite.com/?fb_xd_fragment=</p>
<p>ผมก็ลองคลิกดู ซึ่งพบว่า มันแสดงหน้าเปล่า แต่พอ view source ก็ยังมีข้อมูลเวปอยู่ แสดงว่ามันต้องมีของแน่เลย</p>
<p>วิชาเวปไซด์หายตัว  ยังมีข้อมูลอยู่นะแต่มองไม่เห็น  เหอะ ๆ</p>
<p>&nbsp;</p>
<p>เอาวิธีแก้ไขเลยดีกว่า</p>
<p>เอา code ด้านล่าง ไปใส่ด้านล่างของเวปไซด์ก่อน tag &lt;/body&gt;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span> Correct fb_xd_fragment Bug Start <span style="color: #339933;">--&gt;</span> 
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span> 
document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'html'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'block'</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span> 
<span style="color: #339933;">&lt;!--</span> Correct fb_xd_fragment Bug End <span style="color: #339933;">--&gt;</span></pre></td></tr></table></div>

<p>&nbsp;<br />
จบ</p>
<blockquote><p>จบง่าย ๆ แบบนี้แหละ</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.webshowpow.com/%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b8%9b%e0%b8%b1%e0%b8%8d%e0%b8%ab%e0%b8%b2-fb_xd_fragment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ลบข้อความแนะนำของ text input</title>
		<link>http://www.webshowpow.com/%e0%b8%a5%e0%b8%9a%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%81%e0%b8%99%e0%b8%b0%e0%b8%99%e0%b8%b3%e0%b8%82%e0%b8%ad%e0%b8%87-text-input/</link>
		<comments>http://www.webshowpow.com/%e0%b8%a5%e0%b8%9a%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%81%e0%b8%99%e0%b8%b0%e0%b8%99%e0%b8%b3%e0%b8%82%e0%b8%ad%e0%b8%87-text-input/#comments</comments>
		<pubDate>Wed, 25 May 2011 16:10:43 +0000</pubDate>
		<dc:creator>แว่นตก</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[ข้อความ]]></category>
		<category><![CDATA[พิมพ์]]></category>
		<category><![CDATA[โปรแกรม]]></category>

		<guid isPermaLink="false">http://www.webshowpow.com/?p=69</guid>
		<description><![CDATA[ในเวลาที่เรากดคลิกที่ text input ปกติแล้วจะมีรายการข้อความที่เราเคยพิมพ์ไปแล้ว แสดงขึ้นมาอัตโนมัติ ซึ่งมันก็สะดวกดี แต่ในบางครั้งเราเขียนโปรแกรมที่มี ความปลอดภัยสูง เราก็ไม่อยากจะให้มีข้อความที่เราพิมพฺ์ไปแล้วแสดงขึ้นมา เราสามารถทำได้โดยเพิ่ม code เข้าไปดังนี้ 1 &#60;input name=&#34;textname&#34; type=&#34;text&#34; id=&#34;textname&#34; autocomplete=&#34;off&#34; /&#62; เทคนิคนี้เหมาะสมกับช่อง Username แต่วิธีจะทำให้ไม่ผ่าน W3C นะครับ]]></description>
			<content:encoded><![CDATA[<p>ในเวลาที่เรากดคลิกที่ text input  ปกติแล้วจะมีรายการข้อความที่เราเคยพิมพ์ไปแล้ว<br />
แสดงขึ้นมาอัตโนมัติ  ซึ่งมันก็สะดวกดี แต่ในบางครั้งเราเขียนโปรแกรมที่มี<br />
ความปลอดภัยสูง  เราก็ไม่อยากจะให้มีข้อความที่เราพิมพฺ์ไปแล้วแสดงขึ้นมา<br />
เราสามารถทำได้โดยเพิ่ม code เข้าไปดังนี้</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textname&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textname&quot;</span> autocomplete<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;off&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<blockquote><p>เทคนิคนี้เหมาะสมกับช่อง Username แต่วิธีจะทำให้ไม่ผ่าน W3C นะครับ</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.webshowpow.com/%e0%b8%a5%e0%b8%9a%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%81%e0%b8%99%e0%b8%b0%e0%b8%99%e0%b8%b3%e0%b8%82%e0%b8%ad%e0%b8%87-text-input/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>เพิ่มความเร็วการทำงานของ loop</title>
		<link>http://www.webshowpow.com/%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%a3%e0%b9%87%e0%b8%a7%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%82%e0%b8%ad%e0%b8%87-loop/</link>
		<comments>http://www.webshowpow.com/%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%a3%e0%b9%87%e0%b8%a7%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%82%e0%b8%ad%e0%b8%87-loop/#comments</comments>
		<pubDate>Wed, 25 May 2011 05:36:30 +0000</pubDate>
		<dc:creator>แว่นตก</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[บทความ]]></category>
		<category><![CDATA[เทคนิค]]></category>
		<category><![CDATA[เพิ่มความเร็ว]]></category>

		<guid isPermaLink="false">http://www.webshowpow.com/?p=5</guid>
		<description><![CDATA[โดยส่วนมากแล้ว เวลาเขียน php มักจากหนีไม่พ้นจากการเขียน loop ซึ่งถ้าเขียน 1 2 3 for &#40;$a=0;$a=count&#40;$array_name&#41;;$a++&#41; &#123; do some thing... &#125; จะทำให้การทำงานของ loop นานขึ้น แต่ถ้าเปลี่ยนเป็น 1 2 3 4 $count=count&#40;$array_name&#41;; for &#40;$a=0;$a=$count;$a++&#41; &#123; do some [...]]]></description>
			<content:encoded><![CDATA[<p>โดยส่วนมากแล้ว เวลาเขียน php มักจากหนีไม่พ้นจากการเขียน loop ซึ่งถ้าเขียน</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$a</span><span style="color: #339933;">=</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000088;">$a</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	
	<span style="color: #b1b100;">do</span> some thing<span style="color: #339933;">...</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>จะทำให้การทำงานของ loop นานขึ้น</p>
<p>แต่ถ้าเปลี่ยนเป็น</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$count</span><span style="color: #339933;">=</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$array_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$a</span><span style="color: #339933;">=</span><span style="color: #000088;">$count</span><span style="color: #339933;">;</span><span style="color: #000088;">$a</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	
	<span style="color: #b1b100;">do</span> some thing<span style="color: #339933;">...</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>จะช่วยลดการทำงานของ loop ให้ทำงานเร็วขึ้น</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webshowpow.com/%e0%b8%84%e0%b8%a7%e0%b8%b2%e0%b8%a1%e0%b9%80%e0%b8%a3%e0%b9%87%e0%b8%a7%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%82%e0%b8%ad%e0%b8%87-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

