教學與資訊
[CodeIgniter 4] 設定、取得與檢查 Flashdata
CodeIgniter 的 session 有一個叫做 flashdata 的種類,主要就是在設定後只能取用一次,也就是在一個 request 後下次就拿不到了。
教學與資訊
CodeIgniter 的 session 有一個叫做 flashdata 的種類,主要就是在設定後只能取用一次,也就是在一個 request 後下次就拿不到了。
教學與資訊
要在 CodeIgniter 建立表單,可以透過其內建的函式 form_open() 與 form_open_multipart(),差別在於 form_open() 是建立一般表單,而 form_open_multipart() 則是可以建立要上傳檔案的表單。
教學與資訊
CodeIgniter 裡會紀錄 CI_Session,但時間久了就會累積很多無用的資料,可以透過 CodeIgniter 定期去清掉以免佔硬碟空間。
教學與資訊
要在 PHP 檢查某一個網址是否存在,可以使用 get_headers() 這個 function,並藉由其回傳的 status code 來判斷該網址是否正常。
教學與資訊
要在 CodeIgniter 4 取得網址上分段(segment)的內容,可以參考 Working with URIs 透過 service('uri') 來取得相對應的資訊。
教學與資訊
要刪除 CodeIgniter 4 裡面的檔案可以透過 php 的 unlink() 就好,路徑的話如果是在 public 的資料夾內,在 CodeIgniter 4 要藉由 FCPATH 去指向那個路徑。
教學與資訊
說明在 CodeIgniter 4 處理上傳檔案的方式。
教學與資訊
說明透過 CodeIgniter 使用 Imgur API 上傳圖片的方法。
教學與資訊
說明 CodeIgniter 使用 upload library 上傳檔案的方法。
教學與資訊
要在 CodeIgniter 4 透過 Query Builder 回傳符合條件的筆數可以使用 countAll() 或 countAllResults(),兩個乍看很類似但有一些差別。
教學與資訊
說明 CodeIgniter 4 裡 Query Builder Class where() 相關語法的用法。
教學與資訊
說明在 CodeIgniter 4 透過 Model 的 update() 或 save() 更新資料的方法。
教學與資訊
移除 CodeIgniter 4 導頁後網址出現 index.php 的方法。
教學與資訊
說明在 CodeIgniter 4 透過 Model 選取指定資料欄位的方法。
教學與資訊
說明在 CodeIgniter 4 內透過 Model 關聯其他資料表的方法。
教學與資訊
如果有些資料我們需要暫存,特別是從資料庫來的資料,這樣可以加快網站開啟速度也能降低伺服器的資源使用,在 CodeIgniter 4 我們就可以使用其提供的 Caching Driver。
教學與資訊
說明 CodeIgniter 4 Query Builder Class(查詢生成器類別)的基礎用法。
教學與資訊
在 CodeIgniter 4 使用命名路由讓網址更好管理。