<?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://blog.sudej.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sudej.com</link>
	<description>ก็เวลายังไม่เดินเป็นเส้นตรง แล้วความรักที่มั่นคงจะมีจริงไหม?</description>
	<lastBuildDate>Tue, 07 Sep 2010 10:26:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Block IE6</title>
		<link>http://blog.sudej.com/2009/08/block-ie6/</link>
		<comments>http://blog.sudej.com/2009/08/block-ie6/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 13:08:54 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=843</guid>
		<description><![CDATA[เรื่องก็บอกอยู่แล้วน่ะคับ ปิดกั้น IE6 ก็จะมีคำถามอยู่ว่า ทำไมต้อง ปิดกั้น ไออี6 ผมไม่ได้ซีเรียส กะเรื่อง ความปลอดภัย หรือว่า พวกที่เป็น สริปต์ในการโจมตีเครืองหรอกครับ ผมจะเครียดในเรื่องของ การแสดงผลมากกว่าครับ จึงเขียนเรื่องนี้และ ก็พอหาข้อมูลมา มา ๆ หาวิธีการ บล๊อกกันน่ะคับวันนี้ ตัวอย่างแรก PHP I want to block IE6 and below from my site. I have the following code but that blocks just IE 6. I need a code that just blocks IE6 and below (so [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/08/block-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Class Delete MySQL</title>
		<link>http://blog.sudej.com/2009/07/class-delete-mysql/</link>
		<comments>http://blog.sudej.com/2009/07/class-delete-mysql/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 12:14:40 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=751</guid>
		<description><![CDATA[จากครั้งที่แล้วมา ผมเคยได้ เสนอ การใช้ class เพื่อติดต่อฐานข้อมูล จากลิงค์นี้น่ะคับ class db วันนี้ผมจะนำเสนอ เกี่ยวกับการ ลบ ข้อมูลในตารางออก โดย ที่มี ID เกี่ยวข้องกัน 1 : 1 relation มาดูโค้ดของ การลบ ก่อนคับ โค้ดตรงนี้ ให้นำ ไปใส่ไว้ใน class อันที่แล้วก่อนน่ะคับ class db function del($table=&#34;table&#34;,$where=&#34;where&#34;){ $sql=&#34;DELETE FROM &#34;.$table.&#34; WHERE &#34;.$where; if (mysql_query($sql)){ return true; }else{ $this-&#62;_error(); return false; } } จากนั้นก็มาเขียนโค้ดในหน้าใหม่ คับ $sql=$db-&#62;select_query(&#34;show tables;&#34;); while(list($tables_name)=$db-&#62;fetch($sql)){ $tables_name; $db-&#62;del($table_name,&#34;model_id [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/07/class-delete-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Class insert comma</title>
		<link>http://blog.sudej.com/2009/04/class-insert-comma/</link>
		<comments>http://blog.sudej.com/2009/04/class-insert-comma/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 14:57:26 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[class]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=587</guid>
		<description><![CDATA[คลาสนี้จะรับค่าของ อาร์เรย์เข้ามาหลาย ๆ จำนวนแล้ว ตัวสุดท้ายจะไม่มีคอมม่า ตัวอย่างข้อมูล : ABCD result : A,B,C,D &#60;? class class_insert_comma{ static function read_array($read){ foreach($read as $key =&#62; $val){ echo $val; } } public function change_value($value,$compare_array){ foreach($value as $name =&#62; $val){ if($val){ $file_array[]=$compare_array[&#34;$val&#34;]; } } $file_array=$this-&#62;insert_comma($file_array); return($file_array); } private function insert_comma($value_array){ $uncomma=end($value_array); foreach($value_array as $name){ if($uncomma == $name){ $file_c[]=$name; }else{ $file_c[]=&#34;$name , [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/04/class-insert-comma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>class upload file</title>
		<link>http://blog.sudej.com/2009/03/class-upload-file/</link>
		<comments>http://blog.sudej.com/2009/03/class-upload-file/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 06:57:12 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[class]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=459</guid>
		<description><![CDATA[วันนี้มาแจก อีกแล้วครับ คลาส อัพโหลดไฟล์ ดูโค้ดและ ก็ภาพการทำงานล่ะกันน่ะคับ &#60;? ### class upload version 2 ##  author sudej.com define(&#34;PATH&#34;,&#34;images/&#34;); define(&#34;FILE_LIMIT&#34;,&#34;194304&#34;); //4194304 = 4MB class upload{ public function check_file_to_upload($file){ $file_name = $_FILES[&#34;userfile&#34;][&#34;name&#34;]; $file_size = $_FILES[&#34;userfile&#34;][&#34;size&#34;]; $file_temp = $_FILES[&#34;userfile&#34;][&#34;tmp_name&#34;]; $file_err = $_FILES[&#34;userfile&#34;][&#34;error&#34;]; echo &#34;&#60;div style=\&#34;padding: 4px;\&#34;&#62;ข้อมูลทั่วไป ของไฟล์ที่ทำการอัพโหลด&#60;/div&#62; &#60;ul&#62; &#60;li&#62;ชื่อไฟล์ : &#60;span style=\&#34;color:#933\&#34;;&#62;&#34; .$file_name. &#34;&#60;/span&#62;&#60;/li&#62; &#60;li&#62;ชนิด : &#60;span style=\&#34;color:#933\&#34;;&#62;&#34; .$this-&#62;check_file_type($file_name).&#34;&#60;/span&#62;&#60;/li&#62; &#60;li&#62;ขนาด [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/03/class-upload-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Script Backup Database</title>
		<link>http://blog.sudej.com/2009/02/php-script-backup-database/</link>
		<comments>http://blog.sudej.com/2009/02/php-script-backup-database/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 13:17:59 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=436</guid>
		<description><![CDATA[วันนี้ผมจะมานำเสนอ การ Backup database โดยใช้ php น่ะคับ เป็นการ backup ข้อมูลผ่าน สริปต์ โดยใช้ ตัว crontab ใน Linux เป็นตัวเรียก สริปต์นี้ ใ้ห้ทำงานน่ะคับ วันนี้จะนำเสนอ ในเรื่องของ สริปต์กันก่อนน่ะคัีบ ผมได้ เรียนรู้บางคำสั่ง จาก อาจารย์ เปิ้ล แอบ เซิฟ  และ การโค้ดดิ้ง แนะแนวโดยพี่แม๊กมอไซค์คับ โดยการ backup ในครั้งนี้ เมื่อทำการแบ๊กอัพ เสร็จแล้ว มันจะส่งเมล์ไปบอก ยัง ผู้ดูแลระบบ ในครั้งต่อไปผมจะ นำ คำสั่ง พร้อมกับ ภาพ มาประกอบให้ดูกันน่ะคับ ขอบคุณทุกท่าน ที่ดูแล้ว จะนำไปให้ให้เกิดประโยชน์ต่อไป ขอบคุณทุกท่าน ที่เอาไปใช้แล้วให้เครดิตผม สังคมน่าอยู่เพราะว่ามีคนมีน้ำใจ sp thx[1]: NECTEC [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/02/php-script-backup-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TRUNCATE TABLES ALL</title>
		<link>http://blog.sudej.com/2009/02/truncate-tables-all/</link>
		<comments>http://blog.sudej.com/2009/02/truncate-tables-all/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 12:25:45 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[manage]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[truncate]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=427</guid>
		<description><![CDATA[เมื่อผู้พัฒนา เรื่องเข้าใจ ในการทำงานของ คลาส ดาต้าเบส แล้ว ต่อจากนี้ผมจะเอาตัวที่จัดการ การทำงาน ของ MySQL ตัวหนึ่งมาให้รู้กัน นั้นคือ คำสั่ง TRUNCATE นั้นเองการทำงานของคำสั่งนี่คือการทำให้ Table ที่ทุกสั่งนั้น จะเป็น EMPTY ทั้งหมด ในโปรแกรม phpmyadmin นั้นมีอยู่แล้ว แต่ว่า ผมอยากเขียนขึ้นมาใหม่อ่ะ ขี้เกียจไปเข้ามันช้า มาดูการเขียนกันคับ รูปแบบคำสั่งของมันจะเป็นแบบนี้คับ และ เพิ่มเติมให้อีกอันน่ะคับ นั้นก็คือตัว SHOW TABLES; TRUNCATE TABLE ชื่อเทเบิ้ล; ex TRUNCATE TABLE tbl_model; งั้นมาดูโค้ดที่ผมเขียนกันเลยน่ะคับ ขั้นตอนแรกก็ include ไฟล์ที่ชื่อว่า class.mysql.php เข้ามาก่อนน่ะคับ แ้ล้วไปตั้ง ค่า config ที่ตัว constant กันก่อนคับ ลอง ๆ หาดู [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/02/truncate-tables-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>database class</title>
		<link>http://blog.sudej.com/2009/02/database-class/</link>
		<comments>http://blog.sudej.com/2009/02/database-class/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 11:29:33 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=424</guid>
		<description><![CDATA[เขียนคลาสขึ้นมาเพื่อควบคุมการใช้งาน DATABASE ได้อย่างมีประสิทธิ์ภาพ ขอขอบคุณ พี่แม๊กมอไซค์ สำหรับโค้ดบางส่วนในการพัฒนางานในครั้งนี้ class db{ var $host = DB_HOST; var $database; var $connect_db; var $selectdb; var $db; var $sql; var $table; var $where; public function connectdb($db_name=&#34;database&#34;,$user=&#34;username&#34;,$pwd=&#34;password&#34;){ $this-&#62;database = $db_name; $this-&#62;username = $user; $this-&#62;password = $pwd; $this-&#62;connect_db = mysql_pconnect($this-&#62;host, $this-&#62;username, $this-&#62;password ) or $this-&#62;_error(); $this-&#62;db = mysql_select_db ( $this-&#62;database, $this-&#62;connect_db) or $this-&#62;_error(); mysql_query(&#34;SET [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/02/database-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>การตั้งค่า utf8</title>
		<link>http://blog.sudej.com/2009/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b9%88%e0%b8%b2-utf8/</link>
		<comments>http://blog.sudej.com/2009/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b9%88%e0%b8%b2-utf8/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 11:33:56 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=248</guid>
		<description><![CDATA[สำหรับท่านที่ เปลี่ยนมาใช้ utf-8 แล้วเกิดปัญหา เวลา Browser เปิดข้อมูลแล้วเกิดปัญหาตัวอักษรไม่แสดงผล ตามที่เราตั้งค่าไว้ ปัญหามันเกิดมาจาก ตัว Content-Type:text/html; ไม่ยอมเรียกค่า ปกติมันออกมา เราก็มีวิธีแก้ปัญหาดังนี้คับ สำหรับคนใช้ Linux fedora, redhat น่ะคับ อับดับแรกก็ไปแก้ไข ไฟล์ที่ชื่อว่า httpd.conf &#60;code&#62;########################## AddDefaultCharset UTF-8 AddCharset ISO-8859-1  .iso8859-1  .latin1 AddCharset UTF-8       .utf8 AddCharset utf-8       .utf8 AddCharset TIS-620      .tis-620        th ########################## สำหรับคนที่ไม่สามารถแก้ไขได้เนื่องจากท่านไม่ Admin ระบบ ก็ให้เขียนไฟล์ .htaccess หรือ htaccess.txt แล้วให้ upload ไปยังที่ directory ที่เก็บไฟล์ไว้ของผมอยู่ที่ htdocs คับ ซึ่งของผมเช่า [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/01/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b9%88%e0%b8%b2-utf8/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Array 2 Dimensions</title>
		<link>http://blog.sudej.com/2009/01/array-2-dimensions/</link>
		<comments>http://blog.sudej.com/2009/01/array-2-dimensions/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 13:31:52 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[array]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=215</guid>
		<description><![CDATA[วันนี้ผมจะพูดถึงเรื่องการสร้าง อาร์เรย์ สองมิติคับ เป็นการนำเอาค่าที่ใกล้เคียงกันเข้ามาเก็บไว้ในอาร์เรย์ แล้ว ให้ตัวโปรแกรมแปลงเป็นข้อมูลที่มีดังกล่าว แสดงผลออกมา คราวนี้ผมจะ นำเอาโค้ดมาใส่ไว้ด้วยน่ะคับ ขั้นตอนแรก นำตัวแปล อาร์เรย์มากำหนด ไว้ก่อนคับ ดังภาพ $file_sound_array=array(1=&#62;&#34;$mp3&#34;,&#34;$acc&#34;,&#34;$rm&#34;,&#34;$wav&#34;,&#34;$wma&#34;); $file_vdo_array=array(1=&#62;&#34;$mp4&#34;,&#34;$gp3&#34;,&#34;$wmv&#34;,&#34;$flv&#34;); $file_picture_array=array(1=&#62;&#34;$jpg&#34;,&#34;$bmp&#34;,&#34;$gif&#34;,&#34;$tiff&#34;); $file_document_array=array(1=&#62;&#34;$doc&#34;,&#34;$xls&#34;,&#34;$ppt&#34;,&#34;$pdf&#34;,&#34;$txt&#34;); $file_array=array(&#34;sound&#34;=&#62;$file_sound_array,&#34;vdo&#34;=&#62;$file_vdo_array,&#34;picture&#34;=&#62;$file_picture_array,&#34;document&#34;=&#62;$file_document_array); เมื่อได้แล้วเราก็ไปสร้างคลาสกันเลยคับ ภาพ class class_file_support{ function file_support($file_array){ global $FILE_SOUND,$FILE_VDO,$FILE_PICTURE,$FILE_DOCUMENT; foreach($file_array as $key =&#62; $val_array){ if($key==&#34;sound&#34;){ echo&#34;- ไฟล์เสียง : &#34;; foreach($val_array as $type_sound =&#62; $key_sound){ if($key_sound){ echo $FILE_SOUND[&#34;$key_sound&#34;].&#34;, &#34;; } } }//close if sound if($key==&#34;vdo&#34;){ echo&#34; - ไฟล์วีดีโอ [...]]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/01/array-2-dimensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>return array</title>
		<link>http://blog.sudej.com/2009/01/return-array/</link>
		<comments>http://blog.sudej.com/2009/01/return-array/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 07:28:12 +0000</pubDate>
		<dc:creator>สุดเดช</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[return]]></category>

		<guid isPermaLink="false">http://blog.sudej.com/?p=145</guid>
		<description><![CDATA[วันนี้จะมาแสดงการคืนค่า Function Array กันน่ะคับ คลิ๊กที่รุปเพื่อแสดงผลใหญ่กว่าภาพปัจจุบัน เริ่มจาก เขียน function ลงไปใน Class ก่อนน่ะคับ ตามภาพเลยคับ หลังจากนั้นก็ จะเรียกใช้ Function กันน่ะคับ แล้วก็เป็นผลที่แสดงออกมาน่ะคับ Credit : sudej.com]]></description>
		<wfw:commentRss>http://blog.sudej.com/2009/01/return-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->