2019年5月3日 星期五

Strict Standards: Only variables should be passed by reference in

升級 PHP 後

會遇到錯誤回報 Strict Standards: Only variables should be passed by reference in 
$SQL->bindParam(':page', getenv('REQUEST_URI'));
看到這報錯後,我變更改成以下
$temp = getenv('REQUEST_URI');
$SQL->bindParam(':page', $temp);

Related Posts:

  • PHP Function with Optional ParametersPHP Function with Optional Parameters 有 2 種方法 1. 用 NULL arguments function method($arg1 = null, $arg2 = null){ $arg1 = $arg1? $arg1: "default_value_for_arg1"; $arg2 = $arg2? $arg2: "default_value_for_arg2"; } 2. 傳 Array… Read More
  • Strict Standards: Only variables should be passed by reference in 升級 PHP 後 會遇到錯誤回報 Strict Standards: Only variables should be passed by reference in  $SQL->bindParam(':page', getenv('REQUEST_URI')); 看到這報錯後,我變更改成以下 $temp = getenv('REQUEST_URI'); $SQL-bindParam(':page', $temp);… Read More
  • PHP 日期加減PHP 日期加減 1. mktime() $date1 = date ("Y-m-d H:i:s" , mktime(date('H'), date('i'), date('s'), date('m'), date('d')-1, date('Y'))); $date2 = date ("Y-m-d H:i:s" , mktime(date('H'), date('i'), date('s'), date('m'), date('d'), da… Read More

0 意見:

張貼留言

Popular Posts