บทความ

กำลังแสดงโพสต์จาก สิงหาคม, 2017

Multi-Language implementation in CodeIgniter

รูปภาพ
The Multi-Language feature is necessary for the modern web application. This feature is used for the purpose of internationalization. In this tutorial, we will discuss how to implement the multi-language feature in CodeIgniter framework. Using CodeIgniter’s Language class, you can easily make your site multi-language. CodeIgniter’s Language class provides some functions to retrieve language files and lines of text. The following guides will drive you to the right way for building a multi-language website with CodeIgniter. If you are new to CodeIgniter, you can read  CodeIgniter Tutorial for Beginners  first. Site Default Language Open the  application/config/config.php  file and specify the site’s default language. $config [ 'language' ]  =  'english' ; Creating Language Files Create multiple language files and insert those files into the  application/language/  directory with separate sub-directories for each language (for example, french, german, etc.).

วิธีแก้ MySQL #1146 - Table 'xxx.xxxxx' doesn't exist

รูปภาพ
ปัญหานี้จะเจอเมื่อเราทำการย้าย ฐานข้อมูล MySQL โดยการเข้าไป Copy เอา DBFile ที่อยู่ใน Folder DATA มาเก็บไว้ แล้วทำการวาง DBFile ที่ Copy มา กลับคืนเข้าไป ถ้า MySQL เรา ใช้ MyISAM เป็น Engine จะไม่มีปัญหาอะไร แต่เมื่อไหร่ที่ทำแบบนี้กับ InnoDB จะเกิดปัญหา Table 'xxx.xxxxx' doesn't exist ทันที วิธีแก้คือ เข้าไปที่เครื่องที่เดิมที่ไป Copy DBFile มา จากนั้นให้ไป Copy ไฟล์ที่ขึ้นต้นด้วย ibxx เช่น ib_logfile0 , ibdata1 ทั้งหมด เข้าไปยัง Folder DATA ของ Mysql เครื่องที่เกิดปัญหา  ทำการปิด Service ของ MYSQL ก่อน ไม่งั้นระบบจะไม่ยอมให้ทำการใดๆกับไฟล์ ทำการ วาง ไฟล์ที่ Copy มาทับลงไป เปิด Service ของ Mysql เป็นอันเสร็จสิ้นครับ Credite :  http://reekoong.blogspot.com/2014/01/mysql-1146-table-xxxxxxxx-doesnt-exist.html