<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2238116546095992641</id><updated>2024-11-08T22:10:50.612+07:00</updated><category term="php"/><category term="Jquery"/><category term="SQL"/><category term="Codeigniter"/><category term="javascript"/><category term="phpmyadmin"/><category term="Wordpress"/><category term="cakephp"/><category term="mysql"/><category term="Ajax"/><category term="CSS"/><category term="Navicat"/><category term="Smarty"/><category term="prestashop"/><category term="Add-Ons"/><category term="Dreamweaver"/><category term="FPT"/><category term="FileZilla"/><category term="Google"/><category term="PHPexcel"/><category term="XML"/><category term="curl"/><category term="fpdf"/><category term="jpgraph"/><category term="phpmailer"/><category term="server2go"/><category term="session"/><category term="xampp"/><title type='text'>วิทย์คับ</title><subtitle type='html'>บันทึกช่วยจำ ความรู้ต่าง ๆ</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-6415233408551527892</id><published>2023-07-12T22:07:00.000+07:00</published><updated>2023-07-12T22:07:28.133+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>แก้ปัญหา Codeigniter Vesion 3. ไม่ทำงาน บน php 8. (บางส่วน)</title><content type='html'>&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;Codeigniter Vesion 3. ไม่ทำงานบน php 8.&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แล้วระบบแจ้ง Error&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;Creation of dynamic property CI_URI::$config is deprecated&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;โดยแก้ไข Error บางส่วน ตามด้านล่างนี้&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;code class=&quot;hljs language-php&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;code class=&quot;hljs language-php&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;ใส่ &lt;/span&gt;&lt;/code&gt;&lt;code class=&quot;hljs language-php&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;] ไว้ที่ด้านบน&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แก้ไขที่ ไฟล์ &lt;/span&gt;&lt;/code&gt;&lt;code&gt;system/libaries/Session/drivers/Session_files_driver.php&lt;/code&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$save_path&lt;/span&gt;, &lt;span class=&quot;hljs-variable&quot;&gt;$name&lt;/span&gt;&lt;/span&gt;)
&lt;/span&gt;{
   ...
}

&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;read&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$session_id&lt;/span&gt;&lt;/span&gt;)
&lt;/span&gt;{
  ...
}

&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;write&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$session_id&lt;/span&gt;, &lt;span class=&quot;hljs-variable&quot;&gt;$session_data&lt;/span&gt;&lt;/span&gt;)
&lt;/span&gt;{
  ...
}

&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;close&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;/span&gt;)
&lt;/span&gt;{
  ...
}

&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;destroy&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$session_id&lt;/span&gt;&lt;/span&gt;)
&lt;/span&gt;{
  ...
}

&lt;span class=&quot;hljs-meta&quot;&gt;#[\ReturnTypeWillChange&lt;/span&gt;&lt;span class=&quot;hljs-meta&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;gc&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$maxlifetime&lt;/span&gt;&lt;/span&gt;)
&lt;/span&gt;{
  ...
}&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code class=&quot;hljs language-php&quot; style=&quot;color: #cc0000;&quot;&gt;ใส่ &lt;/code&gt;&lt;code class=&quot;notranslate&quot; style=&quot;color: #cc0000;&quot;&gt;#[\AllowDynamicProperties] ไว้ที่ด้านบน&lt;/code&gt;&lt;code class=&quot;hljs language-php&quot; style=&quot;color: #cc0000;&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แก้ไขที่ ไฟล์ &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;/code&gt;/system/core/URI.php&lt;/pre&gt;
&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot;&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;#[\AllowDynamicProperties]
class CI_URI {&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แก้ไขที่ ไฟล์ &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;/code&gt;/system/core/Router.php&lt;/pre&gt;
&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot;&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;#[\AllowDynamicProperties]
class CI_Router {&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;}&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แก้ไขที่ ไฟล์ &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;/code&gt;/system/core/Loader.php&lt;/pre&gt;
&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot;&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;#[\AllowDynamicProperties]
class CI_Loader {&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;}&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แก้ไขที่ ไฟล์ &lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;/code&gt;/system/core/Controller.php&lt;/pre&gt;
&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot;&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;#[\AllowDynamicProperties]
class CI_Controller {&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;notranslate&quot;&gt;&lt;code class=&quot;notranslate&quot;&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;แก้ไขที่ ไฟล์ &lt;/span&gt;&lt;/code&gt;/system/core/DB_driver.php&lt;/pre&gt;&lt;p&gt;
&lt;code class=&quot;notranslate&quot;&gt;#[\AllowDynamicProperties]&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;notranslate&quot;&gt;abstract class CI_DB_driver {&amp;nbsp;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code class=&quot;notranslate&quot;&gt;} &lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;pre class=&quot;lang-php s-code-block&quot;&gt;&lt;code class=&quot;hljs language-php&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/6415233408551527892/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2023/07/codeigniter-vesion-3-php-8.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/6415233408551527892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/6415233408551527892'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2023/07/codeigniter-vesion-3-php-8.html' title='แก้ปัญหา Codeigniter Vesion 3. ไม่ทำงาน บน php 8. (บางส่วน)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-8860874462225232503</id><published>2020-11-09T17:27:00.003+07:00</published><updated>2020-11-10T08:08:51.274+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>แก้ปัญหา Session Codeigniter Vesion 3. ไม่ทำงาน บน php 7.</title><content type='html'>&lt;p&gt;&lt;b&gt;1.&lt;/b&gt; ไปที่ โฟล์เดอร์ system\libraries\Session&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;2.&lt;/b&gt; เปิดไฟล์ Session.php&lt;/p&gt;&lt;p&gt;&lt;b&gt;3.&lt;/b&gt; ค้นหา &lt;b&gt;$params[&#39;cookie_name&#39;] = ini_get(&#39;session.name&#39;);&lt;/b&gt; แทนด้วย &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;$params[&#39;cookie_name&#39;] = session_name();&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;4.&lt;/b&gt; ค้นหา &lt;b&gt;ini_set(&#39;session.name&#39;, $params[&#39;cookie_name&#39;]);&lt;/b&gt; แทนด้วย &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;session_name($params[&#39;cookie_name&#39;]); &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/8860874462225232503/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2020/11/session-codeigniter-vesion-3-php-7.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/8860874462225232503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/8860874462225232503'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2020/11/session-codeigniter-vesion-3-php-7.html' title='แก้ปัญหา Session Codeigniter Vesion 3. ไม่ทำงาน บน php 7.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-7569999215780406503</id><published>2020-11-09T15:41:00.002+07:00</published><updated>2020-11-09T15:42:54.439+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="phpmyadmin"/><category scheme="http://www.blogger.com/atom/ns#" term="xampp"/><title type='text'>อัพเดทเวอร์ชั่น php, phpMyadmin, Apache บน Xampp</title><content type='html'>&lt;p&gt;&lt;b&gt;1. &lt;/b&gt;ปิด Service Apache บน Xampp Control Panel&lt;b&gt; &lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;2. &lt;/b&gt;ดาวน์โหลด &lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;Xampp เวอร์ชั่นที่ต้องการบน &lt;a href=&quot;https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/&quot;&gt;https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;3.&lt;/b&gt; เลือกไปที่เวอร์ชั่น 7.2.34 -&amp;gt; &lt;a href=&quot;https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.2.34/xampp-windows-x64-7.2.34-0-VC15.zip/download&quot; title=&quot;Click to download xampp-windows-x64-7.2.34-0-VC15.zip&quot;&gt;&lt;span class=&quot;name&quot;&gt;xampp-windows-x64-7.2.34-0-VC15.zip&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.2.34/&quot; title=&quot;Click to enter 7.2.34&quot;&gt;&lt;span class=&quot;name&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;4.&lt;/b&gt; หลังดาวน์โหลดมาแล้วทำการแตกไฟล์ zip ออกไว้ก่อน&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;5.&lt;/b&gt; จากนั้นทำการเปลี่ยนชื่อโฟลเดอร์ &lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;php, phpmyadmin, apache ที่อยู่ใน xampp ของเดิมให้เป็นชื่ออื่น&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;6&lt;/b&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;b&gt;. &lt;/b&gt;เสร็จแล้ว copy โฟลเดอร์ &lt;/span&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;php, phpmyadmin, apache ที่อยู่ในโฟลเดอร์ที่ได้จากการแตกไฟล์ zip ไว้ตามข้อ 3 เพื่อนำมาวางในโฟลเดอร์ &lt;/span&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;xampp แทนของเดิม&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;b&gt;7. &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;เปิด Service Apache บน Xampp Control Panel อีกครั้ง&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;หากไม่มีข้อผิดพลาด ก็จะได้ เวอร์ชั่นใหม่ของ php, phpMyadmin, Apache&lt;/span&gt;&lt;/span&gt;
                      &lt;/p&gt;&lt;p&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt;&lt;span class=&quot;style-scope yt-formatted-string&quot; dir=&quot;auto&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/7569999215780406503/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2020/11/php-phpmyadmin-apache-xampp.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/7569999215780406503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/7569999215780406503'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2020/11/php-phpmyadmin-apache-xampp.html' title='อัพเดทเวอร์ชั่น php, phpMyadmin, Apache บน Xampp'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-2428091780259304584</id><published>2014-08-07T14:29:00.001+07:00</published><updated>2014-08-07T14:29:12.185+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>ดึงโพสต์ ของ เวิร์ดเพรส (wordpress) ด้วย taxonomies และ terms </title><content type='html'>&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;code class=&quot;php plain&quot;&gt;ตัวอย่างการดึง โพสต์ ของ เวิร์ดเพรส (wordpress) ด้วย taxonomies และ terms&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;จากรูปภาพด้านล่าง หากยังไม่รู้ post_type, taxonomy, terms ก็ให้เข้าไปทำการแก้ไข tags&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;ก็จะเกิดลิงค์อย่างรูปด้านล่าง &lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMdkiTVlrJWSP7TMLiL8R9h-pPC8WVhld5G7MERTv2Q_TJYVMdunT61UydVmtGpsbdkPIo7Ulr0049_4VEj9d5tc80QX6RYvhbZ3ATEsBqS15xpVsDWmmzw6kTZhdtW6AbG9zDAWXU6XQ/s1600/xxx.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMdkiTVlrJWSP7TMLiL8R9h-pPC8WVhld5G7MERTv2Q_TJYVMdunT61UydVmtGpsbdkPIo7Ulr0049_4VEj9d5tc80QX6RYvhbZ3ATEsBqS15xpVsDWmmzw6kTZhdtW6AbG9zDAWXU6XQ/s1600/xxx.jpg&quot; height=&quot;141&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code class=&quot;php plain&quot;&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;เสร็จแล้วเมื่อนำมาเขียนเป็นโค้ดเพื่อดึง โพสต์ ก็จะได้ประมาณนี้&amp;nbsp; &lt;/code&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;---------------------------------------------------------------------------------------------------- &lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;get_posts(&lt;/code&gt;&lt;code class=&quot;php keyword&quot;&gt;array&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;(&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;showposts&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; -1,&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;post_type&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;news-item&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;,&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;tax_query&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php keyword&quot;&gt;array&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;(&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php keyword&quot;&gt;array&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;(&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;taxonomy&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;news&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;,&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;field&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;term_id&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;,&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;terms&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php keyword&quot;&gt;6&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number10 index9 alt1&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;),&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number11 index10 alt2&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;orderby&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;title&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;,&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number12 index11 alt1&quot;&gt;
&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;order&#39;&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;=&amp;gt; &lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;ASC&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number13 index12 alt2&quot;&gt;
&lt;code class=&quot;php plain&quot;&gt;);&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;-----------------------------------------------------------------------------------------------------&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;showposts = จำนวนโพสที่เราต้องการดึงมา หากระบุ -1 คือดึงมาทั้งหมดที่มี&lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;post_type = &lt;/code&gt;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;&lt;code class=&quot;php string&quot;&gt;news-item คือ &lt;/code&gt;ค่าที่ได้จากภาพด้านบน&lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;tax_query = ดึงค่าโพสต์ด้วย taxonomy ที่เราจะระบุ ซึ่งจะอยู่ในรูปแบบ array()&lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;--------------------- ค่าที่ระบุใน tax_query() ----------------------------------------------------- &lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;&lt;/code&gt;taxonomy = ค่า &lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;&lt;/code&gt;taxonomy ที่ต้องการดึง ในที่นี้คือค่า news ที่ได้จากภาพด้านบน&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;field = ฟิลด์ที่เป็นเงื่อนไขในการค้นหาซึ่งค่าสามารถเป็นได้ทั้ง term_id, slug, name ของ tags ที่เราต้องการใช้เป็นเงื่อนไขในการค้นหา ในที่นี้ผมใช้ term_id&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php string&quot;&gt;terms = ค่าสำหรับ field ด้านบน ซึ่งค่าที่ระบุสำหรับ &lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;terms ก็คือค่า tag_ID (6) ที่ได้จากภาพด้านบน&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;php string&quot;&gt;&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;--------------------- ค่าที่ระบุใน tax_query() -----------------------------------------------------&lt;/code&gt;&lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;php string&quot;&gt;&lt;code class=&quot;php plain&quot;&gt;&lt;code class=&quot;php string&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/code&gt; &lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;php string&quot;&gt;orderby = เรียงตามชื่อของโพสต์&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;php string&quot;&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code class=&quot;php string&quot;&gt;order = เรียงจากน้อยไปหามาก&lt;/code&gt;&lt;br /&gt;
&lt;code class=&quot;php plain&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/2428091780259304584/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2014/08/wordpress-taxonomies-terms.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2428091780259304584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2428091780259304584'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2014/08/wordpress-taxonomies-terms.html' title='ดึงโพสต์ ของ เวิร์ดเพรส (wordpress) ด้วย taxonomies และ terms '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMdkiTVlrJWSP7TMLiL8R9h-pPC8WVhld5G7MERTv2Q_TJYVMdunT61UydVmtGpsbdkPIo7Ulr0049_4VEj9d5tc80QX6RYvhbZ3ATEsBqS15xpVsDWmmzw6kTZhdtW6AbG9zDAWXU6XQ/s72-c/xxx.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-5568606325290349984</id><published>2014-08-06T10:29:00.001+07:00</published><updated>2014-08-06T10:29:21.833+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>อัพโหลดรูปภาพจากเว็บภายนอก เข้าสู่ Wordpress ผ่านทาง XML-RPC</title><content type='html'>//+ แทรก Library IXR&amp;nbsp; &lt;br /&gt;
include_once(&#39;IXR_Library.php&#39;);&lt;br /&gt;
&lt;br /&gt;
//+ สามารถดาวน์โหลด IXR_Library ได้จาก&lt;br /&gt;
&lt;a href=&quot;http://scripts.incutio.com/xmlrpc/&quot;&gt;http://scripts.incutio.com/xmlrpc/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
//+ ลิงค์ไฟล์ภาพที่จะทำการอัพโหลด &lt;br /&gt;
$myfile = &quot;xxx.jpg&quot;;&lt;br /&gt;
&lt;br /&gt;
//+ เปิดไฟล์ภาพนั้นขึ้นมา &lt;br /&gt;
$fh = fopen($myfile , &#39;r&#39;);&lt;br /&gt;
&lt;br /&gt;
//+ อ่านอธิบายฟังชั่น fopen เพิ่มเติมที่&lt;br /&gt;
&lt;a href=&quot;http://php.net/manual/en/function.fopen.php&quot;&gt;http://php.net/manual/en/function.fopen.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
//+ หาขนาดของภาพออกมาเป็น bytes&lt;br /&gt;
$fs = filesize($myfile );&lt;br /&gt;
&lt;br /&gt;
//+ อ่านอธิบายฟังชั่น filesize เพิ่มเติมที่ &lt;br /&gt;
&lt;a href=&quot;http://php.net/manual/en/function.filesize.php&quot;&gt;http://php.net/manual/en/function.filesize.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
//+ fread ตัวแปร $fh, $fs ที่ได้จากด้านบน&lt;br /&gt;
$theData = fread($fh, $fs);&lt;br /&gt;
&lt;br /&gt;
//+ ปิด $fh 
&lt;br /&gt;
fclose($fh);
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
//+ เริ่มทำการอัพโหลดภาพ&lt;br /&gt;
$usr = &#39;admin&#39;; //+ Username Admin Wordpress&lt;br /&gt;
$pwd = &#39;xxx&#39;; //+ Password Wordpress&lt;br /&gt;
$xmlrpc = &#39;http://www.xxx.com/xmlrpc.php&#39;; //+ ลิงค์ xmlrpc.php ของเว็บ WP เป้าหมาย&lt;br /&gt;
&lt;br /&gt;
$client = new IXR_Client($xmlrpc); //+ สร้าง Object จาก IXR_Library&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
$client-&amp;gt;debug = false; //+ true เพื่อแสดง Debug&lt;br /&gt;
$params = array(&#39;name&#39; =&amp;gt; &#39;xxx.jpg&#39;, &#39;type&#39; =&amp;gt; &#39;image/jpg&#39;, &#39;bits&#39; =&amp;gt; new IXR_Base64($theData), &#39;overwrite&#39; =&amp;gt; false); //+ สร้างชื่อไฟล์ใหม่เพื่ออัพโหลดขึ้นบน WP&lt;br /&gt;
$res = $client-&amp;gt;query(&#39;wp.uploadFile&#39;, 1, $usr, $pwd, $params); //+ อัพโหลดไฟล์&lt;br /&gt;
$returnInfo = $client-&amp;gt;getResponse(); //+ ค่าที่ได้คืนมาหลังจากอัพโหลด&lt;br /&gt;
print_r($returnInfo); //+ แสดงค่าที่ได้คืนมา&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
&amp;nbsp;โค้ดโดยรวมทั้งหมด&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
include_once(&#39;IXR_Library.php&#39;); &lt;br /&gt;
$myfile = &quot;xxx.jpg&quot;;&lt;br /&gt;
$fh = fopen($myfile , &#39;r&#39;);&lt;br /&gt;
$fs = filesize($myfile );&lt;br /&gt;
$theData = fread($fh, $fs);&lt;br /&gt;
fclose($fh);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;
$usr = &#39;admin&#39;;&lt;br /&gt;
$pwd = &#39;xxx&#39;;&lt;br /&gt;
$xmlrpc = &#39;http://www.xxx.com/xmlrpc.php&#39;;&lt;br /&gt;
$client = new IXR_Client($xmlrpc);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;
$client-&amp;gt;debug = false;&lt;br /&gt;
$params = array(&#39;name&#39; =&amp;gt; &#39;xxx.jpg&#39;, &#39;type&#39; =&amp;gt; &#39;image/jpg&#39;, &#39;bits&#39; =&amp;gt; new IXR_Base64($theData), &#39;overwrite&#39; =&amp;gt; false);&lt;br /&gt;
$res = $client-&amp;gt;query(&#39;wp.uploadFile&#39;, 1, $usr, $pwd, $params);&lt;br /&gt;
$returnInfo = $client-&amp;gt;getResponse();&lt;br /&gt;
print_r($returnInfo); &lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
อ่านเพิ่มเติมได้ที่ -&amp;gt;&amp;gt; &lt;a href=&quot;http://code.tutsplus.com/tutorials/uploading-pictures-via-xml-rpc-and-php-to-wordpress--wp-27107&quot;&gt;http://code.tutsplus.com/tutorials/uploading-pictures-via-xml-rpc-and-php-to-wordpress--wp-27107&lt;/a&gt; </content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/5568606325290349984/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2014/08/wordpress-xml-rpc.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/5568606325290349984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/5568606325290349984'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2014/08/wordpress-xml-rpc.html' title='อัพโหลดรูปภาพจากเว็บภายนอก เข้าสู่ Wordpress ผ่านทาง XML-RPC'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-2749930937353422505</id><published>2014-03-06T10:33:00.000+07:00</published><updated>2014-03-06T10:33:55.750+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>หาผลรวมของ array หลายมิติ โดยใช้ค่า index </title><content type='html'>วิธีหาผลรวมของ array ที่มีหลายมิติ โดยใช้ฟังชั่น array_map และ array_sum เข้าช่วย &lt;br /&gt;
&lt;br /&gt;
ตัวอย่างการใช้งาน&lt;br /&gt;
&lt;br /&gt;
$a[1] = array(1200, 2200, 1500, 2000, 2350, 0, 0, 0, 0, 0, 0, 0);&lt;br /&gt;$a[2] = array(1500, 1000, 1254, 2584, 0, 0, 0, 0, 0, 0, 0, 0);&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;$sum = array_map(array_sum, array_map(NULL, $a[1], $a[2]));&lt;br /&gt;print_r ($sum);&lt;br /&gt;
&lt;br /&gt;
ผลลัพธ์ที่ได้ก็จะเป็น &lt;br /&gt;
&lt;br /&gt;
Array
(
    [0] =&amp;gt; 2700
    [1] =&amp;gt; 3200
    [2] =&amp;gt; 2754
    [3] =&amp;gt; 4584
    [4] =&amp;gt; 2350
    [5] =&amp;gt; 0
    [6] =&amp;gt; 0
    [7] =&amp;gt; 0
    [8] =&amp;gt; 0
    [9] =&amp;gt; 0
    [10] =&amp;gt; 0
    [11] =&amp;gt; 0
)

</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/2749930937353422505/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2014/03/array-index.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2749930937353422505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2749930937353422505'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2014/03/array-index.html' title='หาผลรวมของ array หลายมิติ โดยใช้ค่า index '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-7159609919341887328</id><published>2014-02-26T14:06:00.001+07:00</published><updated>2014-02-26T14:06:57.307+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jpgraph"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>วิธี set ค่า JpGraph ให้เป็นภาษาไทย</title><content type='html'>&amp;nbsp;&lt;span class=&quot;detailDesc&quot;&gt;วิธี set ค่า JpGraph ให้เป็นภาษาไทยครับ&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;1. ก๊อปปี้ ฟอนท์ที่อยู่ในเครื่องของเราที่จะใช้เช่นฟอนท์ &lt;/span&gt;&lt;span class=&quot;detailDesc&quot;&gt;cordia, angsana, &lt;/span&gt;&lt;span class=&quot;detailDesc&quot;&gt;browallia โดยไปที่ Start-&amp;gt;พิมพ์คำว่า font แล้วก็อปปี้ฟอนท์เหล่านั้นไปวาง ที่โฟลเดอร์ fonts ของ jpgraph ครับ&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;2.เปิดไฟล์ jpgraph_ttf.inc.php ขึ้นมาเพื่อทำการแก้ไข&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;- ค้นหาคำว่า&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;detailDesc&quot;&gt;define(&#39;CHINESE_TTF_FONT&#39;,&#39;bkai00mp.ttf&#39;); แล้วเพิ่มคำสั่งด้านล่างนี้เข้าไป&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;//+ Thai font&lt;br /&gt;define(&#39;CORDIA_TTF_FONT&#39;, &#39;cordia.ttf&#39;);&lt;br /&gt;define(&#39;CORDIAB_TTF_FONT&#39;, &#39;cordiab.ttf&#39;);&lt;br /&gt;define(&#39;CORDIAI_TTF_FONT&#39;, &#39;cordiai.ttf&#39;);&lt;br /&gt;define(&#39;CORDIAZ_TTF_FONT&#39;, &#39;cordiaz.ttf&#39;);&lt;br /&gt;&lt;br /&gt;define(&#39;ANGSA_TTF_FONT&#39;, &#39;angsa.ttf&#39;);&lt;br /&gt;define(&#39;ANGSAB_TTF_FONT&#39;, &#39;angsab.ttf&#39;);&lt;br /&gt;define(&#39;ANGSAI_TTF_FONT&#39;, &#39;angsai.ttf&#39;);&lt;br /&gt;define(&#39;ANGSAZ_TTF_FONT&#39;, &#39;angsaz.ttf&#39;);&lt;br /&gt;&lt;br /&gt;define(&#39;BROWA_TTF_FONT&#39;, &#39;browa.ttf&#39;);&lt;br /&gt;define(&#39;BROWAB_TTF_FONT&#39;, &#39;browab.ttf&#39;);&lt;br /&gt;define(&#39;BROWAI_TTF_FONT&#39;, &#39;browai.ttf&#39;);&lt;br /&gt;define(&#39;BROWAZ_TTF_FONT&#39;, &#39;browaz.ttf&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;- จากนั้นค้นหาคำว่า &lt;/span&gt;&lt;span class=&quot;detailDesc&quot;&gt;&lt;span class=&quot;detailDesc&quot;&gt;/* Chinese fonts */ จะพบกลุ่มคำสั่งประมาณนี้&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;span class=&quot;detailDesc&quot;&gt;&amp;nbsp;/* Chinese fonts */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FF_SIMSUN&amp;nbsp; =&amp;gt;&amp;nbsp; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_NORMAL =&amp;gt;&#39;simsun.ttc&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLD =&amp;gt;&#39;simhei.ttf&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_ITALIC =&amp;gt;&#39;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLDITALIC =&amp;gt;&#39;&#39; ),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FF_CHINESE&amp;nbsp; =&amp;gt;&amp;nbsp;&amp;nbsp; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_NORMAL =&amp;gt;CHINESE_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLD =&amp;gt;&#39;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_ITALIC =&amp;gt;&#39;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLDITALIC =&amp;gt;&#39;&#39; ),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FF_BIG5&amp;nbsp; =&amp;gt;&amp;nbsp;&amp;nbsp; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_NORMAL =&amp;gt;CHINESE_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLD =&amp;gt;&#39;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_ITALIC =&amp;gt;&#39;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLDITALIC =&amp;gt;&#39;&#39; ),&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;span class=&quot;detailDesc&quot;&gt;- เพิ่มคำสั่งด้านล่างนี้ ต่อจากที่ค้นหาเจอ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;span class=&quot;detailDesc&quot;&gt;/* Thai fonts */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FF_CORDIA =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_NORMAL=&amp;gt;CORDIA_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLD=&amp;gt;CORDIAB_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_ITALIC=&amp;gt;CORDIAI_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLDITALIC=&amp;gt;CORDIAZ_TTF_FONT ),&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FF_ANGSA =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_NORMAL=&amp;gt;ANGSA_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLD=&amp;gt;ANGSAB_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_ITALIC=&amp;gt;ANGSAI_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLDITALIC=&amp;gt;ANGSAZ_TTF_FONT ),&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FF_BROWA =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_NORMAL=&amp;gt;BROWA_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLD=&amp;gt;BROWAB_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_ITALIC=&amp;gt;BROWAI_TTF_FONT,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FS_BOLDITALIC=&amp;gt;BROWAZ_TTF_FONT ), &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;- ค้นหาคำว่า define(&quot;FF_DV_SANSSERIFCOND&quot;,51); แล้วเพิ่มคำสั่งด้านล่างนี้ต่อ&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&amp;nbsp;//thai font&lt;br /&gt;define(&quot;FF_ANGSA&quot;,52);&lt;br /&gt;define(&quot;FF_CORDIA&quot;,53);&lt;br /&gt;define(&quot;FF_BROWA&quot;,54);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;ตัวเลขที่อยู่ด้านหลังอาจจะไม่ตรงกันครับ เช่น คำที่ค้นหา มันเป็นค่า 51 คำสั่งที่เพิ่มเข้าไปเลยต้องต่อเป็น 52 53 54 เพราะฉะนั้นก็เปลี่ยนตามค่าที่ค้นหาเจอจาก &lt;/span&gt;&lt;span class=&quot;detailDesc&quot;&gt;FF_DV_SANSSERIFCOND เลยครับ&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;หลังจากนั้น ในขั้นตอนการใช้งานเราก็เขียนประมาณนี้ เช่น&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;$graph-&amp;gt;title-&amp;gt;SetFont(FF_CORDIA,FS_BOLD,20);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;เพื่อให้ Title มีฟอนท์เป็น cordia ตัวหนา ขนาดอักษร 20&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;$graph-&amp;gt;legend-&amp;gt;SetFont(FF_ANGSA,FS_NORMAL,16);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;เพื่อให้ Legend มีฟอนท์เป็น angsana ตัวธรรมดา ขนาดอักษร 16&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;ครับ&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;detailDesc&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/7159609919341887328/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2014/02/set-jpgraph.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/7159609919341887328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/7159609919341887328'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2014/02/set-jpgraph.html' title='วิธี set ค่า JpGraph ให้เป็นภาษาไทย'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-2444025174616626436</id><published>2013-11-29T10:31:00.001+07:00</published><updated>2013-11-29T10:31:48.304+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dreamweaver"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>ลบการเว้นบรรทัด(linebreaks) ของโค้ด PHP ที่เพิ่มมาใน Dreamweaver</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ปกติแล้วหากเรียนเขียนโค้ดด้วย Dreamweaver บนเครื่อง จัดรูปแบบโค้ดที่เรามองดูแล้วสวยงาม อ่านง่ายสำหรับเรา&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ซึ่งหากบางวันเราจำเป็นต้องแก้ไขโค้ด โดยไม่ได้ใช้ Dreamweaver อาศัยเบราเซอร์ แก้บน cpanel ของโฮสท์ ที่เตรียมไว้ให้เราแก้ไข&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; พอเราดาวน์โหลดไฟล์โค้ดนั้นกลับมาแก้ไขที่เครื่องก็จะพบว่า โค้ดมันเพิ่มการเว้นบรรทัด ที่เราไม่ต้องการกลับมาให้ ดังเช่นภาพด้านล่าง&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img src=&quot;http://upic.me/i/tm/v4zx1.png&quot; /&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
วิธีที่จะทำการแก้ไขคือ&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
- กดปุ่ม CTRL+F หรือ เลือกเมนู Edit-&amp;gt;Find &amp;amp; Replace ก็จะปรากฏไดอะล๊อกขึ้นมาให้&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
- ติ๊กเลือกเช็คบ๊อกหัวข้อ Use regular expression&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
- ตรงช่อง Find ให้ใส่ค่า [\r\n]{2,}&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
- ตรงช่อง Replace ให้ใส่ \n&amp;nbsp; ตามภาพด้านล่างนี้&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img height=&quot;auto&quot; src=&quot;http://upic.me/i/n0/djcx3.png&quot; width=&quot;554&quot; /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
- หลังจากนั้น กด Replace all&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;ผลลัพธที่ได้ก็จะเป็นแบบนี้&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;img src=&quot;http://upic.me/i/0q/b25x2.png&quot; /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/2444025174616626436/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2013/11/linebreaks-php-dreamweaver.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2444025174616626436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2444025174616626436'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2013/11/linebreaks-php-dreamweaver.html' title='ลบการเว้นบรรทัด(linebreaks) ของโค้ด PHP ที่เพิ่มมาใน Dreamweaver'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-8973721544090982845</id><published>2013-06-19T16:44:00.000+07:00</published><updated>2013-06-19T16:46:04.786+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><title type='text'>ไอคอน เพิ่มเติม สำหรับ Css Twitter Bootstrap</title><content type='html'>วิธีการ และ ขั้นตอนในการทำ เข้าไปอ่านเพิ่มเติมได้ที่เว็บ&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://favbulous.com/demo/twitter-bootstrap-custom-icons/&quot;&gt;http://favbulous.com/demo/twitter-bootstrap-custom-icons/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/8973721544090982845/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2013/06/css-twitter-bootstrap.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/8973721544090982845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/8973721544090982845'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2013/06/css-twitter-bootstrap.html' title='ไอคอน เพิ่มเติม สำหรับ Css Twitter Bootstrap'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-7930876166924737742</id><published>2012-11-26T14:13:00.000+07:00</published><updated>2012-12-06T16:48:15.318+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Codeigniter ส่งค่าที่เป็น Url ผ่านทาง Url</title><content type='html'>&amp;nbsp;หากจะส่งค่าที่เป็น Url &amp;nbsp;เช่น http://www.google.co.th ผ่านทาง Url หรือที่รู้จัก คือ ส่งแบบ GET นั่นเอง ซึ่งในการรับค่า GET ของ Codeigniter มันจะแบ่งค่าบน Url ด้วย / ซึ่งมันจะตัดส่วน http กับ www.google.co.th ออกจากกัน&lt;br /&gt;
&lt;br /&gt;
แต่หากต้องการที่จะรับส่งโดยไม่ต้องนำมาต่อให้ยุ่งยาก ก็เลยต้องใช้ base64_encode /&amp;nbsp;base64_decode&amp;nbsp;เข้ามาใช้งานเพื่อแปลง http://www.google.co.th แล้วส่งค่าไปครั้งเดียว&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
ซึ่งค่าของ http://www.google.co.th เมื่อเข้าฟังชั่น base64_encode ก็จะได้ค่าประมาณนี้&amp;nbsp;aHR0cDovL3d3dy5nb29nbGUuY28udGg= จะมีตัวเครื่องหมายเท่ากับ (=) ต่อท้าย ซึ่งตัว Codeigniter จะไม่ยอมให้ส่งเครื่องหมายเหล่านี้ วิธีแก้ไขก็แก้ไขตามนี้&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.technologyrider.com/fixed-%E2%80%9Cthe-uri-you-submitted-has-disallowed-characters-%E2%80%9D-codeigniter-ci-error&quot;&gt;http://www.technologyrider.com/fixed-%E2%80%9Cthe-uri-you-submitted-has-disallowed-characters-%E2%80%9D-codeigniter-ci-error&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
และอีกวิธีซึ่งไม่ต้องไปแก้ไขโค้ดของ Codeigniter&lt;br /&gt;
&lt;br /&gt;
function encode_url($url){&lt;br /&gt;
&amp;nbsp; $base_64 = base64_encode($url);&lt;br /&gt;&amp;nbsp; $url_param = rtrim($base_64, &#39;=&#39;);&lt;br /&gt;&amp;nbsp; $url_param = str_replace(array(&#39;+&#39;, &#39;/&#39;), array(&#39;,&#39;, &#39;-&#39;), $url_param);&lt;br /&gt;&amp;nbsp; return $url_param;}&lt;br /&gt;
&lt;br /&gt;
ใช้งาน&lt;br /&gt;
&lt;br /&gt;
&amp;lt;a href=&quot;&amp;lt;?php echo base_url(&#39;welcome/test/&#39;.encode_url(&#39;).&#39;&#39;) ?&amp;gt;&quot;&amp;gt;Test&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ก็จะได้ Url แบบนี้&amp;nbsp;/welcome/test/aHR0cDovL3d3dy5nb29nbGUuY28udGg &amp;nbsp;หลังจากนั้น ก็ไปทำการรับค่า แล้ว&amp;nbsp;base64_decode ค่าที่ได้ ตามนี้&lt;br /&gt;
&lt;br /&gt;
function decode_url($url){&lt;br /&gt;
&amp;nbsp;&amp;nbsp; $base_64 = $url.str_repeat(&#39;=&#39;, strlen($url) % 4);&lt;br /&gt;&amp;nbsp;&amp;nbsp; $base_64 = str_replace(array(&#39;,&#39;, &#39;-&#39;), array(&#39;+&#39;, &#39;/&#39;), $base_64);&lt;br /&gt;&amp;nbsp;&amp;nbsp; $data = base64_decode($base_64);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; return $data;&lt;br /&gt;
}&lt;br /&gt;
echo&amp;nbsp;decode_url($this-&amp;gt;uri-&amp;gt;segment(3));&lt;br /&gt;
&lt;br /&gt;
ค่าที่ได้ของ&amp;nbsp;$this-&amp;gt;uri-&amp;gt;segment(3) หลังจากแปลงแล้วก็จะกลับมาเป็น http://www.google.co.th เหมือนเดิม</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/7930876166924737742/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/11/codeigniter-url-url.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/7930876166924737742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/7930876166924737742'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/11/codeigniter-url-url.html' title='Codeigniter ส่งค่าที่เป็น Url ผ่านทาง Url'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-6706603093412887471</id><published>2012-10-11T17:06:00.001+07:00</published><updated>2012-10-11T17:07:18.719+07:00</updated><title type='text'>Codeigniter สร้าง Ajax Pagination ด้วย JQuery</title><content type='html'>&lt;div&gt;
บทความนี้เป็นตัวอย่างการนำ Codeigniter มาสร้าง Ajax Pagination ด้วย JQuery โดยผมดัดแปลงจากโค้ดของเว็บนี้&amp;nbsp;&lt;a href=&quot;http://superdit.com/2011/11/22/simple-ajax-pagination-with-jquery-and-codeigniter/&quot;&gt;http://superdit.com/2011/11/22/simple-ajax-pagination-with-jquery-and-codeigniter/&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;ฐานข้อมูลตัวอย่าง&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
CREATE TABLE `tbl_word` (&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; `word_id` int(11) unsigned NOT NULL auto_increment,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; `word` varchar(100) collate utf8_unicode_ci default NULL,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; PRIMARY KEY &amp;nbsp;(`word_id`)&lt;/div&gt;
&lt;div&gt;
) ENGINE=MyISAM AUTO_INCREMENT=1943 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
-- ----------------------------&lt;/div&gt;
&lt;div&gt;
-- Records&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-- ----------------------------&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;1&#39;, &#39;กิน&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;2&#39;, &#39;รับประทาน&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;3&#39;, &#39;ทาน&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;4&#39;, &#39;ตลาด&#39;);&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;5&#39;, &#39;ซุปเบอร์มาเก็ต&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;6&#39;, &#39;แหล่งจำหน่าย&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;7&#39;, &#39;ไม่รู้&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;8&#39;, &#39;ไม่ทราบ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;9&#39;, &#39;มา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;10&#39;, &#39;เข้ามา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;11&#39;, &#39;ก้าวมา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;12&#39;, &#39;ก้าว&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;13&#39;, &#39;ตลาดสด&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;14&#39;, &#39;ล้ำมา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;15&#39;, &#39;ปป&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;16&#39;, &#39;ผู้อำนวยการ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;17&#39;, &#39;ผู้ก่อตั้ง&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;18&#39;, &#39;ผู้ดูแล&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;19&#39;, &#39;กรรมการ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;20&#39;, &#39;กรรมการผู้ก่อตั้ง&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;21&#39;, &#39;ผู้จัดการใหญ่&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;22&#39;, &#39;โดน&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;23&#39;, &#39;ถูก&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;24&#39;, &#39;เคียงข้าง&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;25&#39;, &#39;อยู่คู่&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;26&#39;, &#39;คู่&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;27&#39;, &#39;สโมสร&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;28&#39;, &#39;ทีม&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;29&#39;, &#39;คลับ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;30&#39;, &#39;กลุ่ม&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;31&#39;, &#39;สมาพันธ์&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;32&#39;, &#39;แฟน&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;33&#39;, &#39;คนรัก&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;34&#39;, &#39;ผู้คลั่งไคล้&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;35&#39;, &#39;กล่าว&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;36&#39;, &#39;พูด&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;37&#39;, &#39;บอก&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;38&#39;, &#39;เขา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;39&#39;, &#39;พวกเขา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;40&#39;, &#39;นาย&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;41&#39;, &#39;คุณ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;42&#39;, &#39;พวกคุณ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;43&#39;, &#39;พวกนาย&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;44&#39;, &#39;ยอมรับ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;45&#39;, &#39;นับถือ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;46&#39;, &#39;ไว้ใจ&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;47&#39;, &#39;ชื่นชม&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;48&#39;, &#39;ผม&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;49&#39;, &#39;เรา&#39;);&lt;/div&gt;
&lt;div&gt;
INSERT INTO `tbl_word` VALUES (&#39;50&#39;, &#39;ข้าพเจ้า&#39;);&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Controller&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;?php&lt;/div&gt;
&lt;div&gt;
class Word extends CI_Controller {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;function __construct()&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;parent::__construct();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;load-&amp;gt;model(&#39;word_model&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;load-&amp;gt;helper(&#39;url&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;load-&amp;gt;library(&#39;pagination&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;function index($start=0)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$config[&#39;base_url&#39;] &amp;nbsp; = site_url(&#39;word/index&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$config[&#39;total_rows&#39;] = $this-&amp;gt;word_model-&amp;gt;select_total_rows();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$config[&#39;per_page&#39;] &amp;nbsp; = 5;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$config[&#39;full_tag_open&#39;] = &#39;&amp;lt;div id=&quot;pagination&quot;&amp;gt;&#39;;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$config[&#39;full_tag_close&#39;] = &#39;&amp;lt;/div&amp;gt;&#39;;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$start_row = ($start==0)?5:$config[&#39;per_page&#39;];&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$per_page = ($start==0)?0:$start;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//+ Data&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$data[&#39;rs_word&#39;] = $this-&amp;gt;word_model-&amp;gt;select_all($start_row , $per_page);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;pagination-&amp;gt;initialize($config);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$data[&#39;pagination&#39;] = $this-&amp;gt;pagination-&amp;gt;create_links();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if ($this-&amp;gt;input-&amp;gt;post(&#39;ajax&#39;)) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;$this-&amp;gt;load-&amp;gt;view(&#39;word/ajax_index&#39;, $data);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;$this-&amp;gt;load-&amp;gt;view(&#39;word/index&#39;, $data);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Model&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;?php&lt;/div&gt;
&lt;div&gt;
class Word_model extends CI_Model {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;function __construct()&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;parent::__construct();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;function select_total_rows(){&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;db-&amp;gt;select(&#39;*&#39;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;db-&amp;gt;from(&#39;tbl_word&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return $this-&amp;gt;db-&amp;gt;get()-&amp;gt;num_rows();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;function select_all($start_row, $total_rows){&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;db-&amp;gt;select(&#39;*&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;db-&amp;gt;from(&#39;tbl_word&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$this-&amp;gt;db-&amp;gt;limit($start_row, $total_rows);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return $this-&amp;gt;db-&amp;gt;get();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;View ประกอบด้วย 2 ไฟล์&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;1. index.php&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;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;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;head&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;title&amp;gt;CodeIgniter Ajax Jquery Pagination&amp;lt;/title&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/head&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;script src=&quot;&amp;lt;?php echo base_url(); ?&amp;gt;/js/jquery-1.7.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;script&amp;gt;&lt;/div&gt;
&lt;div&gt;
$(function() {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;applyPagination();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;function applyPagination() {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;$(&quot;#ajax_paging a&quot;).click(function() {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;var url = $(this).attr(&quot;href&quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$.ajax({&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;type: &quot;POST&quot;,&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;data: &quot;ajax=1&quot;,&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;url: url,&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;beforeSend: function() {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$(&quot;#content&quot;).html(&quot;&quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;},&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;success: function(msg) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$(&quot;#content&quot;).html(msg);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;applyPagination();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;});&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;return false;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;});&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
});&lt;/div&gt;
&lt;div&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;style&amp;gt;&lt;/div&gt;
&lt;div&gt;
#pagination{&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;margin:5px;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
#pagination a, #pagination strong {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;background: #FFF;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;padding: 1px 5px;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;text-decoration: none;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;border: 1px solid #0F6059;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;color: #0F6059;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;font-size: 13px;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#pagination strong, #pagination a:hover {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;font-weight: normal;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;background: #cac9c9;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;color:#0F6059;&lt;/div&gt;
&lt;div&gt;
}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
/*pagination*/&lt;/div&gt;
&lt;div&gt;
&amp;lt;/style&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/header&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;body&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;div id=&quot;content&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;div id=&quot;data&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;?php foreach($rs_word-&amp;gt;result() as $row_word): ?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&amp;lt;?php echo $row_word-&amp;gt;word; ?&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;?php endforeach; ?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;div id=&quot;ajax_paging&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;?php echo $pagination; ?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/div&amp;gt; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/body&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;2. ajax_index.php&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;div id=&quot;data&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;?php foreach($rs_word-&amp;gt;result() as $row_word): ?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&amp;lt;?php echo $row_word-&amp;gt;word; ?&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;?php endforeach; ?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;div id=&quot;ajax_paging&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;?php echo $pagination; ?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
หน้าตาก็จะออกมาประมาณนี้ครับ&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;img src=&quot;http://upic.me/i/k3/11-10-255517-01-05.png&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/6706603093412887471/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/10/codeigniter-ajax-pagination-jquery.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/6706603093412887471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/6706603093412887471'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/10/codeigniter-ajax-pagination-jquery.html' title='Codeigniter สร้าง Ajax Pagination ด้วย JQuery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-5951459160215883322</id><published>2012-10-01T13:51:00.000+07:00</published><updated>2012-10-01T13:51:13.082+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>PHP หาเดือนก่อนหน้า และ ย้อนหลัง 1 เดือน</title><content type='html'>&amp;lt;?php&lt;br /&gt;
function get_month($mm=&quot;&quot;) {&amp;nbsp; &lt;br /&gt;
&amp;nbsp;$_month_name = array(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;01&quot;=&amp;gt;&quot;มกราคม&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;02&quot;=&amp;gt;&quot;กุมภาพันธ์&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;03&quot;=&amp;gt;&quot;มีนาคม&quot;,&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;04&quot;=&amp;gt;&quot;เมษายน&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;05&quot;=&amp;gt;&quot;พฤษภาคม&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;06&quot;=&amp;gt;&quot;มิถุนายน&quot;,&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;07&quot;=&amp;gt;&quot;กรกฎาคม&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;08&quot;=&amp;gt;&quot;สิงหาคม&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;09&quot;=&amp;gt;&quot;กันยายน&quot;,&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;10&quot;=&amp;gt;&quot;ตุลาคม&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;11&quot;=&amp;gt;&quot;พฤศจิกายน&quot;, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;12&quot;=&amp;gt;&quot;ธันวาคม&quot;); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $monthN= $_month_name[$mm]; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;return $monthN; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
$date =date(&#39;Y-m-d&#39;);&lt;br /&gt;
$nextmonth =date(&#39;Y-m-d&#39;, strtotime(&quot;+1 month&quot;)); //+ เดือนหน้า&lt;br /&gt;
$lastmonth =date(&#39;Y-m-d&#39;, strtotime(&quot;-1 month&quot;)); //- เดือนที่แล้ว&lt;br /&gt;
&lt;br /&gt;
$month = date(&quot;m&quot;,strtotime($date));&lt;br /&gt;
$nextmonth = date(&quot;m&quot;,strtotime($nextmonth));&lt;br /&gt;
$lastmonth = date(&quot;m&quot;,strtotime($lastmonth));&lt;br /&gt;
&lt;br /&gt;
echo &quot;วันที่ปัจจุบัน : &quot;.$date.&quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
echo &quot;&amp;lt;hr /&amp;gt;&quot;;&lt;br /&gt;
echo &quot;เดือนก่อนหน้า : &quot;.get_month($lastmonth).&quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
echo &quot;เดือนปัจจุบัน : &quot;.get_month($month).&quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
echo &quot;เดือนหน้า : &quot;.get_month($nextmonth).&quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
?&amp;gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/5951459160215883322/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/10/php-1.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/5951459160215883322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/5951459160215883322'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/10/php-1.html' title='PHP หาเดือนก่อนหน้า และ ย้อนหลัง 1 เดือน'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-3563447873005406806</id><published>2012-08-27T17:34:00.008+07:00</published><updated>2012-09-27T14:11:47.205+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="prestashop"/><title type='text'>Prestashop เพิ่ม Textbox จำนวนที่จะซื้อ และจำนวนคงเหลือ ไว้หน้าแรก</title><content type='html'>Prestashop ธีม Default ในหน้าแรกจะมีรายการสินค้าให้เลือกเพื่อหยิบเข้าตระกร้า แต่จะไม่มีให้กรอกจำนวน หาอยากได้มากว่าหนึ่งชิ้น&lt;br /&gt;
&lt;br /&gt;
ก็ทำการกดเพิ่มเข้าไปเรื่อย ๆ ระบบก็จะทำการบวกให้ หน้าจอก็จะประมาณนี้ครับ&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/0u/27-8-255517-35-57.png&quot; /&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
ที่นี้เราก็จะมาทำการเพิ่ม Textbox เพื่อใส่จำนวนในกรณีที่อยากได้มากกว่า หนึ่งชิ้น กันครับ&lt;br /&gt;
&lt;br /&gt;
ไปที่ไฟล์ homefeatured.tpl ซึ่งจะอยู่ใน โฟลเดอร์เว็บของเรา/modules/homefeatured/&lt;br /&gt;
&lt;br /&gt;
หรือจะทำการสร้างโฟลเดอร์ modules ใหม่ภายในธีมของเราแล้วก็อบปี้ไฟล์ homefeatured.tpl ไปวางได้เพื่อจะไม่ให้กระทบกับ modules หลัก โดยไปที่&lt;br /&gt;
&lt;br /&gt;
โฟลเดอร์เว็บของเรา / themes / themedefault(prestashop) / สร้างโฟลเดอร์ modules / สร้างโฟลเดอร์ homefeatured / ก็อบปี้ไฟล์ homefeatured.tpl มาวาง แล้วก็แก้ไขที่ไฟล์นี้แทน&lt;br /&gt;
&lt;br /&gt;
- โดยหาโค้ดนี้ครับ&lt;br /&gt;
&lt;br /&gt;
{if ($product.quantity &amp;gt; 0 OR $product.allow_oosp) AND $product.customizable != 2}&lt;br /&gt;
&amp;lt;a rel=&quot;ajax_id_product_{$product.id_product}&quot; href=&quot;{$base_dir}cart.php?qty=1&amp;amp;amp;id_product={$product.id_product}&amp;amp;amp;token={$static_token}&amp;amp;amp;add&quot; title=&quot;{l s=&#39;Add to cart&#39; mod=&#39;homefeatured&#39;}&quot;&amp;gt;{l s=&#39;Add to cart&#39; mod=&#39;homefeatured&#39;}&amp;lt;/a&amp;gt;&lt;br /&gt;
{else}&lt;br /&gt;
&amp;lt;span&amp;gt;{l s=&#39;Add to cart&#39; mod=&#39;homefeatured&#39;}&amp;lt;/span&amp;gt;&lt;br /&gt;
{/if}&lt;br /&gt;
&lt;br /&gt;
- หลังจากนั้นก็ทำการแทนโค้ดด้านบน ด้วยโค้ดนี้ครับ&lt;br /&gt;
&lt;br /&gt;
{if ($product.allow_oosp OR $product.quantity &amp;gt; 0) &amp;amp;&amp;amp; $product.customizable != 2}&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;{l s=&#39;Balance :&#39;}{$product.quantity}&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;{l s=&#39;Quantity :&#39;}&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;text&quot;  name=&quot;ajax_qty_to_add_to_cart[{$product.id_product|intval}]&quot;  id=&quot;quantity_wanted_{$product.id_product|intval}&quot; value=&quot;{if  isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}&quot; size=&quot;2&quot;  maxlength=&quot;3&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;a class=&quot;exclusive ajax_add_to_cart_button&quot; rel=&quot;ajax_id_product_{$product.id_product|intval}&quot;  href=&quot;{$base_dir}cart.php?add&amp;amp;amp;id_product={$product.id_product|intval}&amp;amp;amp;token={$static_token}&quot;&amp;gt;{l s=&#39;Add to cart&#39; mod=&#39;homefeatured&#39;}&amp;lt;/a&amp;gt;&lt;br /&gt;
{else}&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;label&amp;gt;{l s=&#39;Quantity :&#39;}&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;text&quot;  name=&quot;ajax_qty_to_add_to_cart[{$product.id_product|intval}]&quot;  id=&quot;quantity_wanted_{$product.id_product|intval}&quot; value=&quot;{if  isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}&quot; size=&quot;2&quot;  maxlength=&quot;3&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;{l s=&#39;Out of Stock&#39; mod=&#39;homefeatured&#39;}&amp;lt;/span&amp;gt;&lt;br /&gt;
{/if}&lt;br /&gt;
&lt;br /&gt;
- จากนั้นไปที่ไฟล์ ajax-cart.js จะอยู่ใน โฟลเดอร์เว็บของเรา/modules/blockcart/  หาโค้ดนี้ครับ&lt;br /&gt;
&lt;br /&gt;
ajaxCart.add(idProduct, null, false, this);&lt;br /&gt;
&lt;br /&gt;
- แล้วแทนที่ด้วยโค้ดนี้&lt;br /&gt;
&lt;br /&gt;
ajaxCart.add(idProduct, null, false, this, $(&#39;#quantity_wanted_&#39;+idProduct).val());http://www.blogger.com/img/blank.gif&lt;br /&gt;
&lt;br /&gt;
หน้าจอหลังจากเปลี่ยนแปลงโค้ด&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/oa/27-8-255517-51-33.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
อ้างอิงจากบทความ &lt;a href=&quot;http://www.prestashopic.com/how-to-add-quantity-to-your-home-featured-module&quot;&gt;http://www.prestashopic.com/how-to-add-quantity-to-your-home-featured-module&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/3563447873005406806/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/08/prestashop-textbox.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/3563447873005406806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/3563447873005406806'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/08/prestashop-textbox.html' title='Prestashop เพิ่ม Textbox จำนวนที่จะซื้อ และจำนวนคงเหลือ ไว้หน้าแรก'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-1466580383927539714</id><published>2012-08-21T17:46:00.005+07:00</published><updated>2012-08-24T15:44:11.988+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="prestashop"/><title type='text'>prestashop รันแล้วเป็นหน้าจอว่างเปล่า ไม่แสดง Error</title><content type='html'>หลังจากได้นำ prestashop ที่ติดตั้งไว้บนเซิฟเวอร์ กลับลงมาเก็บไ้ว้ที่เครื่อง ปรับแต่งค่าทุกอย่างให้ถูกต้อง แล้วทดลองรันดู&lt;br /&gt;&lt;br /&gt;ไม่ขึ้นข้อความอะไรเลย เป็นหน้าจอว่างเปล่า วิธีแก้ไขปัญหาเบื่องต้นคือ&lt;br /&gt;&lt;br /&gt;- ไปที่ไฟล์ config.inc.php ในโฟลเดอร์ config &lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- ปรับแก้ @ini_set(&#39;display_errors&#39;, &#39;on&#39;); จาก off ให้เป็น on เพื่อให้มันแจ้ง Error ทางหน้าจอ&lt;br /&gt;&lt;br /&gt;- หลังจากนั้น รีเฟรช หน้าจอใหม่อีกครั้ง ก็จะขึ้น Error นี้ครับ Fatal error: Call to undefined function mcrypt_decrypt() in D:\www\prestashop\classes\Rijndael.php on line 61&lt;br /&gt;&lt;br /&gt;หลังจากได้รับแจ้งข้อความ Error ดังนี้แล้ว ก็แก้ไขปัญหาต่อไปตามนี้ครับ&lt;br /&gt;&lt;br /&gt;- ไปที่ตาราง ps_configuration ในฟิวล์ name หาค่า PS_CIPHER_ALGORITHM หลังจากนั้นปรับค่า value จาก 1 เป็น 0&lt;br /&gt;&lt;br /&gt;หรือจะเป็น SQL ก็ UPDATE `ps_configuration` SET `value` = &#39;0&#39; WHERE `name` = &#39;PS_CIPHER_ALGORITHM&#39;;http://www.blogger.com/img/blank.gif&lt;br /&gt;&lt;br /&gt;หลังจากนั้นก็รีเฟรชหน้าอีกที ก็จะรันได้เป็นปกติครับ&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;อ้างอิงจาก&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://customprestshoptemplates.blogspot.com/2012/03/error-prestashop-php-fatal-error-call.html&quot;&gt;http://customprestshoptemplates.blogspot.com/2012/03/error-prestashop-php-fatal-error-call.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;หมายเหตุ การแสดงผลอาจจะผิดเพี้ยนครับ</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/1466580383927539714/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/08/prestashop-error.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/1466580383927539714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/1466580383927539714'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/08/prestashop-error.html' title='prestashop รันแล้วเป็นหน้าจอว่างเปล่า ไม่แสดง Error'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-4095311115315672782</id><published>2012-08-16T10:39:00.006+07:00</published><updated>2012-08-16T11:09:07.916+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><title type='text'>ใช้ฟอนต์บนเว็บไซต์ด้วย cufont</title><content type='html'>ขั้นตอนต่าง ๆ อ้างอิงจากบทความ &lt;a href=&quot;http://www.select2web.com/jquery/font-on-web-by-cufon.html&quot;&gt;http://www.select2web.com/jquery/font-on-web-by-cufon.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. ก็อปปี้โค้ดไฟล์ Cufon.yui.js ที่หน้า &lt;a href=&quot;https://cdnjs.cloudflare.com/ajax/libs/cufon/1.09i/cufon-yui.js&quot;&gt;https://cdnjs.cloudflare.com/ajax/libs/cufon/1.09i/cufon-yui.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. แปลงฟ้อนท์ ที่ &lt;a href=&quot;http://cufon.shoqolate.com/generate/&quot;&gt;http://cufon.shoqolate.com/generate/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ในขั้นตอนการนำเอาฟ้อนท์ที่อยากใช้ไปแปลง เพื่อให้แสดงภาษาไทย ให้ทำดังนี้&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- เลือกไฟล์ฟ้อนท์ ที่ต้องการแปลง ด้านล่างข้อความ Select the font you&#39;d like to use โดยจะมีให้เลือกว่าจะเอา ตัวหนังสือ ธรรมดา ตัวหนา ตัวเอียง ก็ให้เลือกตามไฟล์ .ttf ที่เรามีได้เลย&lt;br /&gt;&lt;br /&gt;- กรอก ชื่อไฟล์ .js ที่ต้องการหลังจากทำการแปลง บน textbox ด้านล่างข้อความ&lt;br /&gt;Use the following value as the font-family of the generated font (optional)&lt;br /&gt;&lt;br /&gt;- ติ๊กเลือกที่ Checkbox หน้า The EULAs of these fonts allow Web Embedding (without Adobe Flash)&lt;br /&gt;&lt;br /&gt;- ติ๊กเลือกที่ Checkbox หน้า All Includes all available glyphs। Highly unrecommended&lt;br /&gt;&lt;br /&gt;- ติ๊กเลือกที่ Checkbox หน้า I acknowledge and accept these terms&lt;br /&gt;&lt;br /&gt;จากนั้นกดที่ Let&#39;s do this! ก็จะมีไดอะล๊อกบ๊อกเพื่อให้บันทึกเป็นไฟล์ .js ตามชื่อที่เราป้อน&lt;br /&gt;&lt;br /&gt;โค้ดตัวอย่างที่ทำการทดลอง&lt;br /&gt;&lt;br /&gt;&amp;lt;!doctype html&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;script src=&quot;js/jquery-1.7.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;!--อย่าลืมไฟล์นี้หน่ะครับ--&gt;&lt;br /&gt;&amp;lt;script src=&quot;js/cufon-yui.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src=&quot;js/TH_Niramit_700.font.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt; Cufon.replace(&#39;h1&#39;);&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;h1 {&lt;br /&gt; font-size:40px;&lt;br /&gt; color: #2A2A2A&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;หนุ่มไปขลิบอวัยวะเพศ หมอพลาดทำไหม้เกรียม !&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;ผลลัพธ์ที่ได้ก็จะเป็นดังรูปด้านล่างเลยครับ&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://upic.me/i/iw/16-8-255511-01-37.png&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/4095311115315672782/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/08/cufont.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/4095311115315672782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/4095311115315672782'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/08/cufont.html' title='ใช้ฟอนต์บนเว็บไซต์ด้วย cufont'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-8338618214842212067</id><published>2012-08-15T12:26:00.003+07:00</published><updated>2012-08-15T12:46:38.455+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Codeigniter Mail Subject ไม่เป็นภาษาไทย</title><content type='html'>หลังจากได้ทำการส่งเมล์ด้วยไลบรารี่ ของ Codeigniter&lt;br /&gt;&lt;br /&gt;$this-&amp;gt;email-&amp;gt;subject(&#39;มีสมาชิกใหม่ สมัครเข้าใช้งานระบบ&#39;); //หัวข้อของอีเมล&lt;br /&gt;&lt;br /&gt;เมื่อเข้าไปตรวจเช็คเมล์ที่ทำการทดลองส่ง เนื้อหา ทุกอย่างใช้งานได้ แต่ผิดปกติอยู่ หัวข้อ อีเมล์&lt;br /&gt;&lt;br /&gt;กลับได้อย่างรูปด้านล่าง&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://upic.me/i/v3/15-8-255512-29-14.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;วิธีแก้ปัญหาเมื่อเจอเหตุการณ์ ให้ทำการสร้างไฟล์ MY_Email.php ไปไว้ที่ โฟลเดอร์ application-&amp;gt;libraries&lt;br /&gt;แล้วทำการเพิ่มโค้ดด่านล่างนี้เข้าไป&lt;br /&gt;&lt;br /&gt;&amp;lt;?php if ( ! defined(&#39;BASEPATH&#39;)) exit(&#39;No direct script access allowed&#39;);&lt;br /&gt;&lt;br /&gt;class MY_Email extends CI_Email&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt; * Set Email Subject&lt;br /&gt; *&lt;br /&gt; * @access    public&lt;br /&gt; * @param    string&lt;br /&gt; * @return    void&lt;br /&gt; */&lt;br /&gt;function subject($subject)&lt;br /&gt;{&lt;br /&gt;    $subject = &#39;=?&#39;. $this-&amp;gt;charset .&#39;?B?&#39;. base64_encode($subject) .&#39;?=&#39;;&lt;br /&gt;    $this-&amp;gt;_set_header(&#39;Subject&#39;, $subject);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;หลังจากนั้นให้ทำการทดลองส่งเมล์ออกไปใหม่อีกครั้ง ก็จะได้หัวข้ออีเมล์เป็นภาษาไทยโดยสมบูรณ์อย่างภาพด้านล่างเลยครับ&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://upic.me/i/yu/15-8-255512-28-14.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;อ้างอิงตามบทความ&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://codeigniter.com/forums/viewthread/160893/#981671&quot;&gt;http://codeigniter.com/forums/viewthread/160893/#981671&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.narisa.com/forums/index.php?app=blog&amp;amp;module=display&amp;amp;section=blog&amp;amp;blogid=9&amp;amp;showentry=2488&quot;&gt;http://www.narisa.com/forums/index.php?app=blog&amp;amp;module=display&amp;amp;section=blog&amp;amp;blogid=9&amp;amp;showentry=2488&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.php.net/manual/en/function.mail.php#108669&quot;&gt;http://www.php.net/manual/en/function.mail.php#108669&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/8338618214842212067/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/08/codeigniter-mail-subject.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/8338618214842212067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/8338618214842212067'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/08/codeigniter-mail-subject.html' title='Codeigniter Mail Subject ไม่เป็นภาษาไทย'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-6958648715478440682</id><published>2012-07-11T10:38:00.005+07:00</published><updated>2012-07-26T11:29:09.191+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Checkbox เลือกแล้วยังคงอยู่ เมื่อเปลี่ยนหน้า</title><content type='html'>บทความนี้เป็นตัวอย่างง่าย ๆ ในการทำให้ตัว เช็คบ๊อก(Checkbox) ยังคงอยู่เมื่อเราเปลี่ยนหน้าไปหน้าอื่น ซึ่งการทำเช่นนี้ เหมาะสำหรับเมื่อมีข้อมูลเยอะ ๆ แล้วนำมาแบ่งหน้าเพื่อแสดง ในตัวอย่างก็จะทำ Session มาเป็นตัวช่วยในการเก็บค่าให้ยังคงอยู่เมื่อเปลี่ยนหน้า&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;ตัวอย่าง จะประกอบด้วย ३ ไฟล์ ดังนี้&lt;br /&gt;&lt;br /&gt;ไฟล์ test-१.php&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;session_start();&lt;br /&gt;//+ ฟังชั่นสำหรับเช็คค่า Checkbox กับ Session&lt;br /&gt;function check_session($value){&lt;br /&gt;if(isset($_SESSION[&#39;value&#39;])){&lt;br /&gt;    if(in_array($value, $_SESSION[&#39;value&#39;])){&lt;br /&gt;        return true;&lt;br /&gt;    }else{&lt;br /&gt;        return false;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;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;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.7.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;function set_session(ele){&lt;br /&gt;if(ele.checked==true){&lt;br /&gt;    $.ajax({&lt;br /&gt;      type: &#39;POST&#39;,&lt;br /&gt;      url: &quot;set_session.php&quot;, //+ ส่งค่าไปสร้าง Session ที่ไฟล์ set_session.php&lt;br /&gt;      data: {value:ele.value, con:&#39;create&#39;}&lt;br /&gt;    });&lt;br /&gt;}else{&lt;br /&gt;    $.ajax({&lt;br /&gt;      type: &#39;POST&#39;,&lt;br /&gt;      url: &quot;set_session.php&quot;, //+ ยกเลิก Session หากติ๊กเครื่องหมายถูกออก&lt;br /&gt;      data: {value:ele.value, con:&#39;delete&#39;}&lt;br /&gt;    });&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;?php for($i=1; $i&amp;lt;=20; $i++){ ?&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;checkbox[]&quot; id=&quot;checkbox&quot; value=&quot;&amp;lt;?php echo $i ?&amp;gt;&quot; &amp;lt;?php if(check_session($i))echo&#39;checked=&quot;checked&quot;&#39; ?&amp;gt; onclick=&quot;set_session(this);&quot; /&amp;gt;&lt;br /&gt;ข้อมูลลำดับที่ : &amp;lt;?php echo $i ?&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;?php } ?&amp;gt;&lt;br /&gt;&amp;lt;a href=&quot;test-1.php&quot;&amp;gt;1&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;test-2.php&quot;&amp;gt;2&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ไฟล์ test-२.php&lt;br /&gt;&amp;lt;?php&lt;br /&gt;session_start();&lt;br /&gt;//+ ฟังชั่นสำหรับเช็คค่า Checkbox กับ Session&lt;br /&gt;function check_session($value){&lt;br /&gt;  if(isset($_SESSION[&#39;value&#39;])){&lt;br /&gt;      if(in_array($value, $_SESSION[&#39;value&#39;])){&lt;br /&gt;          return true;&lt;br /&gt;      }else{&lt;br /&gt;          return false;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;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;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.7.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;function set_session(ele){&lt;br /&gt;  if(ele.checked==true){&lt;br /&gt;      $.ajax({&lt;br /&gt;        type: &#39;POST&#39;,&lt;br /&gt;        url: &quot;set_session.php&quot;, //+ ส่งค่าไปสร้าง Session ที่ไฟล์ set_session.php&lt;br /&gt;        data: {value:ele.value, con:&#39;create&#39;}&lt;br /&gt;      });&lt;br /&gt;  }else{&lt;br /&gt;      $.ajax({&lt;br /&gt;        type: &#39;POST&#39;,&lt;br /&gt;        url: &quot;set_session.php&quot;,  //+ ยกเลิก Session หากติ๊กเครื่องหมายถูกออก&lt;br /&gt;        data: {value:ele.value, con:&#39;delete&#39;}&lt;br /&gt;      });&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;?php for($i=21; $i&amp;lt;=40; $i++){ ?&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;checkbox[]&quot; id=&quot;checkbox&quot; value=&quot;&amp;lt;?php echo $i ?&amp;gt;&quot; &amp;lt;?php if(check_session($i))echo&#39;checked=&quot;checked&quot;&#39; ?&amp;gt; onclick=&quot;set_session(this);&quot; /&amp;gt;&lt;br /&gt;ข้อมูลลำดับที่ : &amp;lt;?php echo $i ?&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;?php } ?&amp;gt;&lt;br /&gt;&amp;lt;a href=&quot;test-1.php&quot;&amp;gt;1&amp;lt;/a&amp;gt; | &amp;lt;a href=&quot;test-2.php&quot;&amp;gt;2&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;ไฟล์ set_session.php&lt;br /&gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;//+ ไฟล์สำหรับสร้าง Session&lt;br /&gt;session_start();&lt;br /&gt;if($_POST[&#39;con&#39;] == &#39;create&#39;){&lt;br /&gt;if (!in_array($_POST[&#39;value&#39;], $_SESSION[&#39;value&#39;])) {&lt;br /&gt; $_SESSION[&#39;value&#39;][] = $_POST[&#39;value&#39;];&lt;br /&gt;}&lt;br /&gt;}else{&lt;br /&gt;if (in_array($_POST[&#39;value&#39;], $_SESSION[&#39;value&#39;])) {&lt;br /&gt; $key = array_search($_POST[&#39;value&#39;], $_SESSION[&#39;value&#39;]);  //+ ใช้ฟังชั่น array_search หา index array&lt;br /&gt; unset($_SESSION[&#39;value&#39;][$key]);  //+ ลบ Session ด้วย index array ที่ได้&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/6958648715478440682/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/07/checkbox.html#comment-form' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/6958648715478440682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/6958648715478440682'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/07/checkbox.html' title='Checkbox เลือกแล้วยังคงอยู่ เมื่อเปลี่ยนหน้า'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-4484242429949327010</id><published>2012-07-02T11:13:00.003+07:00</published><updated>2012-07-02T11:24:59.083+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curl"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>เว็บไซต์ำตัวอย่างโค้ด สำหรับดึงรายละเอียดต่าง ๆ ของ ไอพี ด้วย PHP และ Curl</title><content type='html'>เว็บไซต์ำตัวอย่างโค้ด ที่เอาไว้ใช้ดึงรายละเอียดของ ไอพี ด้วย PHP และ Curl&lt;br /&gt;&lt;a href=&quot;http://creative-geeks.com/blog/2012/05/06/getting-ip-information-with-php-and-curl/&quot;&gt;http://creative-geeks।com/blog/2012/05/06/getting-ip-information-with-php-and-curl/&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;display: block;&quot; id=&quot;formatbar_Buttons&quot;&gt;&lt;span class=&quot; down&quot; style=&quot;display: block;&quot; id=&quot;formatbar_CreateLink&quot; title=&quot;ลิงก์&quot; onmouseover=&quot;ButtonHoverOn(this);&quot; onmouseout=&quot;ButtonHoverOff(this);&quot; onmouseup=&quot;&quot; onmousedown=&quot;CheckFormatting(event);FormatbarButton(&#39;richeditorframe&#39;, this, 8);ButtonMouseDown(this);&quot;&gt;&lt;img src=&quot;http://www.blogger.com/img/blank.gif&quot; alt=&quot;ลิงก์&quot; class=&quot;gl_link&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/4484242429949327010/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/07/php-curl.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/4484242429949327010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/4484242429949327010'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/07/php-curl.html' title='เว็บไซต์ำตัวอย่างโค้ด สำหรับดึงรายละเอียดต่าง ๆ ของ ไอพี ด้วย PHP และ Curl'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-635330282052673219</id><published>2012-04-25T10:58:00.000+07:00</published><updated>2012-04-25T10:58:28.964+07:00</updated><title type='text'>ตัด HTML Tags ใน javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
พอดีไปเจอบทความ การตัด HTML Tags ใน Javascript เลยจัดเก็บไว้เผื่อเอาไว้ใช้งาน&lt;br /&gt;
&lt;br /&gt;
จากเว็บ &lt;a href=&quot;http://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/&quot;&gt;http://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/&lt;/a&gt; โค้ดที่เขาเขียนไว้ให้คือ&lt;br /&gt;
&lt;br /&gt;
var StrippedString = OriginalString.replace(/(&amp;lt;([^&amp;gt;]+)&amp;gt;)/ig,&quot;&quot;);&lt;br /&gt;
&lt;br /&gt;
วิธีการนำไปใช้งาน &lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
var OriginalString = &#39;&amp;lt;a 
href=&quot;http://localhost/program_seo/word_instead/edit/1&quot; id=&quot;edit&quot; 
name=&quot;edit&quot; class=&quot;edit-instead&quot;&amp;gt;&amp;lt;font 
color=&quot;#FF0000&quot;&amp;gt;{กิน|รับประทาน|ทาน}&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;&#39;;&lt;br /&gt;
var StrippedString = OriginalString.replace(/(&amp;lt;([^&amp;gt;]+)&amp;gt;)/ig,&quot;&quot;);&lt;br /&gt;
alert( StrippedString );&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ข้อความที่ได้ก็จะเป็น &quot; {กิน|รับประทาน|ทาน} &quot; เท่านั้นครับ&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/635330282052673219/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/04/html-tags-javascript.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/635330282052673219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/635330282052673219'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/04/html-tags-javascript.html' title='ตัด HTML Tags ใน javascript'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-120568010882042603</id><published>2012-03-08T15:25:00.000+07:00</published><updated>2012-03-08T15:26:36.993+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Codeigniter 2.1.0 ใช้งาน SQL SELECT LIKE  ออฟชั่น  none ไม่ได้</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;color: black;&quot;&gt;
Codeigniter 2.1.0&amp;nbsp; เขียนคำสั่งเพื่อเลือกข้อมูล&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;$this-&amp;gt;db-&amp;gt;like(&#39;ชื่อฟิว&#39;,&#39;&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&lt;/code&gt;&lt;code&gt;คำที่ต้องการค้นหา&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&lt;/code&gt;&lt;code&gt;&#39;,&#39;none&#39;);&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;ซึ่งผล&lt;/code&gt;&lt;code&gt;ลัพธ์&lt;/code&gt;&lt;code&gt; SQL ของมันที่ควรจะเป็นหลังจากเราเพิ่ม &#39;none&#39; ต่อท้าย เพื่อไม่ใส่ % คือ&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code style=&quot;color: black;&quot;&gt;where&amp;nbsp;&#39;&lt;/code&gt;&lt;code&gt;ชื่อฟิว&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&#39;&amp;nbsp;like&amp;nbsp;&#39;&lt;/code&gt;&lt;code&gt;คำที่ต้องการค้นหา&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&#39;&lt;/code&gt;&lt;code&gt; &lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;แต่ผลลัพธ์ที่ได้รับกลับเป็น&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;where&amp;nbsp;&#39;&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&lt;/code&gt;&lt;code&gt;ชื่อฟิว&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&lt;/code&gt;&lt;code&gt;&#39;&amp;nbsp;like&amp;nbsp;&#39;%&lt;/code&gt;&lt;code&gt;คำที่ต้องการค้นหา&lt;/code&gt;&lt;code style=&quot;color: black;&quot;&gt;&lt;/code&gt;&lt;code&gt;%&#39;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;ซึ่งมันก็ยังใส่ % มาให้เรา&lt;/code&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;วิธีแก้ไขปัญหานี้คือ&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;ไปที่ system-&amp;gt;database-&amp;gt;DB_active_rec.php&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;หลังจากเปิดไฟล์ DB_active_rec.php แล้ว ค้นหาคำว่า&amp;nbsp; if ($side == &#39;before&#39;)&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;อยู่ประมาณบรรทัด 664&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;เพิ่ม&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($side === &#39;none&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; $like_statement = $prefix.&quot; $k $not LIKE &#39;{$v}&#39;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;เข้าไปก่อนคำสั่ง&amp;nbsp; &lt;/code&gt;&lt;code&gt; if ($side == &#39;before&#39;)&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;ก็จะได้ประมาณนี้&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($side === &#39;none&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $like_statement = $prefix.&quot; $k $not LIKE &#39;{$v}&#39;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif ($side == &#39;before&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; $like_statement = $prefix.&quot; $k $not LIKE &#39;%{$v}&#39;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif ($side == &#39;after&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; $like_statement = $prefix.&quot; $k $not LIKE &#39;{$v}%&#39;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; $like_statement = $prefix.&quot; $k $not LIKE &#39;%{$v}%&#39;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;ที่มา :&amp;nbsp;&lt;a href=&quot;http://codeigniter.com/forums/viewthread/207134/&quot;&gt;http://codeigniter.com/forums/viewthread/207134/&lt;/a&gt; &lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #007700;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/120568010882042603/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/03/codeigniter-210-sql-select-like-none.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/120568010882042603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/120568010882042603'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/03/codeigniter-210-sql-select-like-none.html' title='Codeigniter 2.1.0 ใช้งาน SQL SELECT LIKE  ออฟชั่น  none ไม่ได้'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-5659875126282413808</id><published>2012-03-03T22:50:00.000+07:00</published><updated>2012-03-04T11:35:15.016+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="phpmyadmin"/><title type='text'>แก้ปัญหาเข้า PhpmyAdmin ใน window 7 ไม่ได้</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
วันนี้ หลังจากได้ไปถอย โน๊ตบุ๊คเครื่องใหม่สเป็คต่ำ ๆ มาเครื่องหนึ่ง แล้วลงวินโดว์ 7 เสร็จสิ้น จากนั้นก็ลง Appserv เวอร์ชั่น 2.5.10 เพื่อใช้งาน พอลงเสร็จทดลองเปิดบราวเซอร์&amp;nbsp; http://localhost ก็รันได้ปกติ แต่พอเข้า phpmyadmin ใส่ user:root / pass:1234 ตามที่ได้ใส่ไว้เมื่อตอนติดตั้ง กลับเข้าไปหน้า Phpmyadmin ไม่ได้ แต่พอลองใส่ user แบบมั่ว ๆ กลับเข้าได้ แต่แก้ไขสิทธิ์ ต่าง ๆ ไม่ได้ อีกทั้งยังมองไม่เห็นฐานข้อมูล พื้นฐานของ Phpmyadmin&lt;br /&gt;
&lt;br /&gt;
ซึ่งวิธีในการแก้ปัญหา ดังนี้&lt;br /&gt;
&lt;br /&gt;
เข้าไปที่ AppServ-&amp;gt;www-&amp;gt;phpMyadmin&lt;br /&gt;
&lt;br /&gt;
ซึ่งภายในโฟลเดอร์จะมีไฟล์ config.inc อยู่&lt;br /&gt;
&lt;br /&gt;
แก้ไข &lt;br /&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;$cfg[&#39;Servers&#39;][$i][&#39;auth_type&#39;] = &#39;cookie&#39;; &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;เป็น&amp;nbsp; &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;$cfg[&#39;Servers&#39;][$i][&#39;auth_type&#39;] = &#39;config&#39;; &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;เพิ่ม คำสั่งอีก 3 บรรทัดต่อเข้าไปด้านล่าง &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;$cfg[&#39;Servers&#39;][$i][&#39;user&#39;] = &#39;root&#39;;
$cfg[&#39;Servers&#39;][$i][&#39;password&#39;] = &#39;&#39;;
$cfg[&#39;Servers&#39;][$i][&#39;AllowRoot&#39;] = true; &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;แก้ไข &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;$cfg[&#39;Servers&#39;][$i][&#39;AllowNoPassword&#39;] = false;&amp;nbsp; &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;เป็น&amp;nbsp; &lt;/pre&gt;
&lt;pre class=&quot;text&quot; style=&quot;font-family: monospace;&quot;&gt;$cfg[&#39;Servers&#39;][$i][&#39;AllowNoPassword&#39;] = true; &lt;/pre&gt;
&lt;br /&gt;
แล้วบันทึก ท่านจะสมารถใช้แอคเค้า root แบบไม่มีรหัสผ่านเข้า phpMyadmin ได้&lt;br /&gt;
&lt;br /&gt;
ที่มา : http://www.select2web.com/phpmyadmin/config-phpmyadmin-automatic-login.html &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/5659875126282413808/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/03/phpmyadmin-window-7.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/5659875126282413808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/5659875126282413808'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/03/phpmyadmin-window-7.html' title='แก้ปัญหาเข้า PhpmyAdmin ใน window 7 ไม่ได้'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-2884326301815041098</id><published>2012-02-18T13:16:00.000+07:00</published><updated>2012-02-18T13:16:31.594+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="server2go"/><title type='text'>server2go ลบฐานข้อมูล เมื่อ shutdown</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;หากใครได้ใช้งาน server2go สำหรับจำลองเซิฟเวอร์ เพื่อรันทดลอง ไฟล์งานบน Usb แล้ว ก็คงรู้สึกถูกใจไม่้น้อย เพราะไม่ต้องยุ่งยากมาก และพกพาไปไหนมาไหนสะดวกเสียด้วย แต่ server2go เนี่ยะ เวลาเราสร้างฐานข้อมูลอะไรขึ้นมาแล้ว เมื่อเรากดปิด บราวเซอร์ ไปมันจะลบฐานข้อมูลที่เราสร้างมาหมด&lt;br /&gt;
&lt;br /&gt;
วิธีที่จะทำให้มันไม่ลบฐานข้อมูลของเรา&lt;br /&gt;
&lt;br /&gt;
ให้ไปที่ไฟล์&amp;nbsp; pms_config.ini&amp;nbsp; ค้นหาคำว่า LocalMirror=1&lt;br /&gt;
&lt;br /&gt;
เปลี่ยนจาก LocalMirror=1 เป็น LocalMirror=0&lt;br /&gt;
&lt;br /&gt;
ฐานข้อมูลทั้งหมดก็จะเก็บอยู่ไหนโฟลเดอร์ dbdir&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ที่มา : &lt;a href=&quot;http://codecorner.grumpynut.com/index.php?blog=7&amp;amp;p=138&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&quot;&gt;http://codecorner.grumpynut.com/index.php?blog=7&amp;amp;p=138&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&lt;/a&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/2884326301815041098/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/02/server2go-shutdown.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2884326301815041098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/2884326301815041098'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/02/server2go-shutdown.html' title='server2go ลบฐานข้อมูล เมื่อ shutdown'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-1652760401893535076</id><published>2012-02-09T15:23:00.003+07:00</published><updated>2012-02-15T11:54:41.663+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Add-Ons"/><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><title type='text'>ใช้ Gmarks Add-Ons ของ Firfox เก็บ Bookmarks ต่าง ๆ ที่ชื่นชอบไว้บน Google</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ในบางวัน หากว่าเราได้ท่องโลกอินเตอร์เน็ต แล้วไปเจอลิงค์ สื่อการสอน ที่น่าสนใจ แล้วต้องการจะเก็บไว้อ่านในภายหลัง&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; แต่หากว่าเราไม่ได้ใช้เครื่องตัวเอง อาจจะจดจำลิงค์นั้นไม่ได้ ซึ่งวันนี้ผมก็เลยได้ลองใช้งาน Gmarks&amp;nbsp; Add-Ons ของ Firfox เพื่อเก็บ Bookmarks ต่าง ๆ บนเครื่องไปเก็บไว้บน Google ซึ่งจะทำให้สะดวกเมื่อเราไปเปิดไปเครื่องอื่น แล้วต้องการที่จะไปลิงค์ที่ได้บันทึกไว้&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
วิธีการใช้งาน คร่าว ๆ ของ Gmark &lt;br /&gt;
&lt;br /&gt;
1. เปิด บราวเซอร์ Firefox แล้วไปที่ลิงค์ &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/gmarks/&quot;&gt;https://addons.mozilla.org/en-US/firefox/addon/gmarks/&lt;/a&gt; เพื่อเพิ่ม Add-Ons ของ Firefox&lt;br /&gt;
&lt;br /&gt;
2. หลังจากติดตั้งแล้ว รีสตาร์ท Firefox ครั้งหนึ่ง จะมีเมนูนี้เพิ่มขึ้นมา&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/n4/2wjb1.jpg&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
3. ต่อไปผมต้องการจะเพิ่ม Bookmarks ต่าง ๆ ของผมที่มีอยู่ใน firefox บนเครื่องไว้บน Google ก็ไปที่ Gmark -&amp;gt; Organize Bookmarks&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/pd/vgpf2.jpg&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
4. หลังจากนั้นจะมี ป๊อบอัพขึ้นมา ให้ไปที่ File -&amp;gt; Import หลังจากนั้นรอสักครู่ Bookmarks ที่อยู่บนครื่อง ก็จะเข้าไปอยู่ใน Bookmarks ของ Google แล้วครับ&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/nr/r3hf3.jpg&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;ก่อนใช้งาน Gmarks ต้องล๊อกอินด้วย Account ของ Gmail ครับ&lt;/u&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/1652760401893535076/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/02/gmarks-add-ons-firfox-bookmarks-google.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/1652760401893535076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/1652760401893535076'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/02/gmarks-add-ons-firfox-bookmarks-google.html' title='ใช้ Gmarks Add-Ons ของ Firfox เก็บ Bookmarks ต่าง ๆ ที่ชื่นชอบไว้บน Google'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-1088317017115415295</id><published>2012-02-06T10:11:00.000+07:00</published><updated>2012-02-06T10:16:13.331+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FileZilla"/><category scheme="http://www.blogger.com/atom/ns#" term="FPT"/><title type='text'>วิธีแก้ปัญหาไม่สามารถเข้าใช้งาน ftp ได้ กรณี Error-Failed to retrieve directory listing</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;color: black; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; หากท่านไม่สามารถเข้าใช้งาน ftp ได้ ทั้งที่ ตรวจสอบแล้วว่า username - password ถูกต้อง เมื่อเวลา เชื่อมต่อท่านกลับได้ Error ดังนี้ &lt;span style=&quot;color: red;&quot;&gt;Failed to retrieve directory listing&lt;/span&gt;&amp;nbsp; โดยใ้ช้โปรแกรม &lt;span style=&quot;color: green;&quot;&gt;FileZilla&lt;span style=&quot;color: black;&quot;&gt; (ภาษาไทย) ครับ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;วิธีแก้ไขปัญหา :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;1. ให้ไปที แก้ไข-&amp;gt;การตั้งค่า&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/ph/2wtd1.jpg&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
2. ไปที่ FTP เปลี่ยน Radio จาก Passive(recommended) เป็น Active&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/35/bsc82.jpg&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
3.ไปที่ Active mode เลือกที่ “Ask your operating system for the external IP address” หากโปรแกรมเลือกไว้อยู่แล้วข้ามหัวข้อนี้ครับ&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/q9/k3703.jpg&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. ไปที่ Passive mode เลือก &quot;Fall Back to Active Mode&quot; แล้วตกลง&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://upic.me/i/cy/kt544.jpg&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ข้อมูลจาก &lt;a href=&quot;http://mytechzone.info/2011/09/filezilla-error-failed-to-retrieve-directory-listing/&quot;&gt;http://mytechzone.info/2011/09/filezilla-error-failed-to-retrieve-directory-listing/&lt;/a&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/1088317017115415295/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2012/02/ftp-error-failed-to-retrieve-directory.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/1088317017115415295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/1088317017115415295'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2012/02/ftp-error-failed-to-retrieve-directory.html' title='วิธีแก้ปัญหาไม่สามารถเข้าใช้งาน ftp ได้ กรณี Error-Failed to retrieve directory listing'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2238116546095992641.post-4995995591227052657</id><published>2011-12-26T11:55:00.002+07:00</published><updated>2011-12-26T11:55:50.093+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>เขียน Function ให้ Return ค่าออกมาหลายค่า</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
โดยปกติแล้ว เวลาเขียน ฟังชั่นก์ ซัก ฟังชั่นก์ ก็มักจะรีเทิร์น ค่าออกมาเพียงค่าเดียว แต่หากอยากจะเพิ่มค่าที่ รีเทิร์น กลับมาหลาย ๆ ค่า เราก็สามารถใช้ &lt;u style=&quot;color: #cc0000;&quot;&gt;compact-extract&lt;/u&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; ของ&lt;/span&gt;&lt;/span&gt; PHP ได้เลย&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #cc0000;&quot;&gt;
&lt;u&gt;ตัวอย่างการใช้งาน ของ PHP&lt;/u&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
function Composite($x, $y) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $sum = $x + $y; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $dif = $x - $y; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return compact(&#39;sum&#39;, &#39;dif&#39;); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
extract(Composite(3, 4));&lt;br /&gt;
echo $sum;&lt;br /&gt;
echo $dif;&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
การใช้งาน &lt;a href=&quot;http://php.net/manual/en/function.compact.php&quot;&gt;compact&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://www.php.net/manual/en/function.extract.php&quot;&gt;extract&lt;/a&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://witkub.blogspot.com/feeds/4995995591227052657/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://witkub.blogspot.com/2011/12/function-return.html#comment-form' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/4995995591227052657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2238116546095992641/posts/default/4995995591227052657'/><link rel='alternate' type='text/html' href='http://witkub.blogspot.com/2011/12/function-return.html' title='เขียน Function ให้ Return ค่าออกมาหลายค่า'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>