Category Archives: PHP

截斷中文字避免亂碼 Cut Chinese Characters

https://blog.xuite.net/chenbruse/bruse/13351768-%E8%A7%A3%E6%B1%BAPHP+substr%E5%88%87%E5%89%B2%E4%B8%AD%E6%96%87%E5%AD%97%E5%95%8F%E9%A1%8C

自已寫的

 

Line break from PHP to Javascript

 

Escape XML node value

 

HTTP_RAW_POST_DATA

$GLOBALS[‘HTTP_RAW_POST_DATA’] works only on < PHP 5.5

 

Dynamic function name: call_user_func_array

Basic

Class method

 

Eloquent to access another DB

Reference:

  1. https://stackoverflow.com/questions/31847054/how-to-use-multiple-databases-in-laravel

Join in CodeIgniter