顯示具有 PHP 標籤的文章。 顯示所有文章
顯示具有 PHP 標籤的文章。 顯示所有文章

2015年11月12日 星期四

[PHP]htmlentities 跟 htmlspecialchars 的區別

htmlentities

- Convert all applicable characters to HTML entities.
- [ Manual ]

htmlspecialchars

- Convert special characters to HTML entities.

- The translations performed are:
  • '&' (ampersand) becomes '&'
  • '"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
  • "'" (single quote) becomes ''' (or ') only when ENT_QUOTES is set.
  • '<' (less than) becomes '&lt;'
  • '>' (greater than) becomes '&gt;'
- [ Manual ]

2015年3月6日 星期五

[PHP]Error: Only variables should be passed by reference

  Strict Standards: Only variables should be passed by reference in '\pach\filename.php' on line NNN .

第NNN行:$price = array_shift(get_product_price($product_key));