TCPDF 中文字導致空白頁面解決方法 / TCPDF some Non-ASCII character causing writeHTML empty output

最近使用TCPDF 遇到 writeHTML / writeHTMLCell 整個變成空白的 Bug

經自行 Debug 後發現問題出於 getHtmlDomArray(),
部分 preg_replace 會錯誤把部分字元替代錯誤, 最後導致整個HTML Block無效

Continue reading “TCPDF 中文字導致空白頁面解決方法 / TCPDF some Non-ASCII character causing writeHTML empty output”

CodeIgniter 3.0 KCFinder Integration Script

CodeIgniter sessions and PHP native session both works fine.
But not together.

Mixing CI sessions and native session in CodeIgniter always causing troubles.

Script outside CI cannot access CI Session, no even $_SESSION native session created inside CI script.

The real problem is KCFinder use $_SESSION to control various things (Include access control).
But it can’t access anything created by CI scripts.

So I can either make KCFinder read CI session or let CI use native session.

Continue reading “CodeIgniter 3.0 KCFinder Integration Script”