ผมหาทางติดตั้ง Smarty 3.1.7 เพื่อให้ใช้งานได้กับ CodeIgniter 2.1.0 ได้ โดยมีขั้นดังนี้
ดาวน์โหลดและติดตั้ง CodeIgniter ตามปกติ การติดตั้ง Smarty จะดำเนินการโดยใช้ Ci-Smarty ที่พัฒนาขึ้นโดยคุณ Dwayne Charrington ให้ดาวน์โหลดและติดตั้งลงใน CodeIgniter ในข้อ 1. แล้วให้ทำการทดสอบว่าสามารถใช้งาน Smarty ได้จริง เนื่องจากในขณะที่เขียนบทความนี้ Smarty ที่ิติดตั้งใน Ci-Smarty เป็นเวอร์ชัน 3.1.1 เราจึงต้องมีการแก้ไขปรับแก้ไฟล์ โดยโครงสร้างไฟล์ของ Ci-Smarty มีดังภาพข้างล่างนี้
เราต้องปรับแก้ 3 [...]
หากใช้งาน Apache ที่มากับ Mac OS X แล้วเกิดปัญหา mod_rewrite ไม่ทำงาน ให้แก้ไขที่ไฟล์ /etc/apache2/users/username.conf (แทนที่ username ด้วย username จริงๆ ที่ใช้งานในระบบ) ให้แก้ไข ที่ AllowOverride None ให้เป็น AllowOverride All ดังตัวอย่างข้างล่าง
<Directory "/Users/username/Sites/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from All </Directory>
ผมเปลี่ยนชื่อจาก http://www.diary.in.th/my เป็น http://my.diary.in.th
ขั้นตอนการดำเนินการก็ไม่ยาก เพราะอยู่ใน account เดียวกันแค่สร้าง subdomain เพิ่ม และก็อปปี้ข้อมูลจากไดเรกทอรีเดิมไปที่ใหม่
WordPress ก็ได้ทำเว็บไซต์เกี่ยวกับเรื่องนี้ไว้ด้วย สามารถทำตามได้เลย
http://codex.wordpress.org/Moving_WordPress http://codex.wordpress.org/Changing_The_Site_URL
หลังจากย้ายข้อมูลเสร็จก็ใช้ Apache mod rewrite จัดการให้ลิ้งก์เดิมถูกส่งต่อไปลิ้งใหม่ เช่น http://www.diary.in.th/archives/572 จะถูกส่งต่อไปที่ http://my.diary.in.th/archives/572 โดยอัตโนมัติ
ผมเขียนคำสั่งต่อไปนี้ในไฟล์ .htaccess
RewriteEngine On Redirect 301 /my http://my.diary.in.th Redirect 301 /archives http://my.diary.in.th/archives
“Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.” – http://git-scm.com
“Gitosis is a tool which provides access control and remote management for hosted Git repositories. It allows for fine-grained management of read and write access over SSH, without [...]
การกำหนดให้ MySQL ใช้ utf-8 เป็นค่า default สามารถทำได้โดยการแก้ไข /etc/my.cnf ดังนี้
[client] default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] default-character-set = utf8 collation-server = utf8_unicode_ci init-connect=’SET NAMES utf8′ character-set-server = utf8
Tags
.htaccess Apache blogspot CentOS codeigniter CSS domain name driver Drupal Flickr Hotmail HTML internet law linux mailing list mailman MICT mod_rewrite monitor MSL MySQL name server Network open source PHP Postfix Security Smarty sony Spammail SPF theme TLS traffic log Universiade UTF-8 UTF8 vbulletin Wordpress การเมือง จตุคาม รูปภาพ สถิติ เรารักในหลวง
