Ứng dụng Ci của bạn đang gặp vấn đề về sql_mode và cần cài đặt lại giá trị cho mode này? Như đã giới thiệu…
Xem thêm Cài đặt SQL MODE trong Codeigniter (CI)Category: Codeigniter – CI
Các nội dung xây dựng, phát triển web trên nền tảng php với CodoIgniter Frameword
Khắc phục lỗi mất session trong Codeigniter (ci) – Do sai trật tự khởi động session
Trong bài viết Khắc phục lỗi mất session trong Codeigniter (ci) tôi đã chia sẻ cách khắc phục lỗi mất session của ci. Trong đó, nguyên…
Xem thêm Khắc phục lỗi mất session trong Codeigniter (ci) – Do sai trật tự khởi động sessionSend mail with SMTP Gmail Server in Codeginter (ci)
Để có thể sử dụng gmail để gửi mail bằng code thì bạn phải bật chế độ cho phép ứng dụng kém an toàn trước cái đã.…
Xem thêm Send mail with SMTP Gmail Server in Codeginter (ci)CodeIgniter: HMVC Multi Projects
Nếu bạn đang muốn xây dựng hệ thống website với 1 source duy nhất nhưng có thể chạy nhiều project? Thì đây! ngay bên dưới,…
Xem thêm CodeIgniter: HMVC Multi ProjectsKhắc phục lỗi mất session trong Codeigniter (ci)
1. Mô tả hiện trạng Tôi sử dụng dụng Codeigniter – Ci để xây dựng một website quản lý. Lúc đó, tôi gặp phải vấn đề session lưu phiên…
Xem thêm Khắc phục lỗi mất session trong Codeigniter (ci)Khắc phục lỗi “PHP Fatal error: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of ParseError given” trong Codeigniter (ci)
1. Tình trạng lỗi Tôi sử dụng Codeigniter và xuất hiện lỗi sau. “PHP Fatal error: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be…
Xem thêm Khắc phục lỗi “PHP Fatal error: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of ParseError given” trong Codeigniter (ci)Sử dụng .htaccess loại bỏ “index.php” trong đường dẫn CodeIgniter – CI
Để loại bỏ “index.php” trong đường dẫn truy cập website ta tạo file .htaccess với nội dung sau:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L,QSA] </IfModule> <IfModule !mod_rewrite.c> # Without mod_rewrite, route 404's to the front controller ErrorDocument 404 /index.php </IfModule> |
nosomovo
Xem thêm Sử dụng .htaccess loại bỏ “index.php” trong đường dẫn CodeIgniter – CICài đặt nơi lưu trữ session trong CodeIgniter – CI
CodeIgniter – Ci hỗ trợ 2 cách lưu trữ session là lưu trữ dạng file và lưu trữ trong databse. 1. Lữu trữ session dạng…
Xem thêm Cài đặt nơi lưu trữ session trong CodeIgniter – CILấy kết quả của query insert trong CI
Bạn thực hiện một lệnh insert vào cơ sở dữ liệu và muốn kiểm tra trạng thái thêm có thành công hay không. Nhưng bạn…
Xem thêm Lấy kết quả của query insert trong CICấu hình base_url động trong CI
Để Ci nhận cấu hình base_url động theo giao thức và domain user truy cập, trong file config.php ta thay thế $config['base_url'] = 'http://yourdomain'; bởi đoạn sau:
1 2 |
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $config['base_url'] = $protocol.$_SERVER['SERVER_NAME']; |
…
Xem thêm Cấu hình base_url động trong CIKhắc phục lỗi “Only variable references should be returned by reference” trong CI
1. Mô tả lỗi: A PHP Error was encountered Severity: Notice Message: Only variable references should be returned by reference Filename: core/Common.php Line Number: 257…
Xem thêm Khắc phục lỗi “Only variable references should be returned by reference” trong CI