Wednesday, February 2, 2011

PHP Notice: Undefined variable: type in ...

Solved
  • แก้คอนฟิกที่ PHP.INI
  • ให้หา บรรทัด error_reporting
error_reporting = E_ALL &
  • แล้ว เพิ่ม & ~E_NOTICE เข้าไปจะได้แบบนี้
error_reporting = E_ALL & ~E_NOTICE
  • ประโยชน์ของ Notice
Enabling E_NOTICE during development has some benefits. For debugging purposes: NOTICE messages will warn you about possible bugs in your code. For example, use of unassigned values is warned. It is extremely useful to find typos and to save time for debugging. NOTICE messages will warn you about bad style. For example, $arr[item] is better to be written as $arr['item'] since PHP tries to treat “item” as constant. If it is not a constant, PHP assumes it is a string index for the array.


Refer

No comments:

Post a Comment

Popular Posts