What does the PHP error message “Notice: Use of undefined constant” mean?

前端 未结 9 2217
悲&欢浪女
悲&欢浪女 2020-11-21 05:04

PHP is writing this error in the logs: \"Notice: Use of undefined constant\".

Error in logs:

PHP Notice:  Use of undefined constant          


        
9条回答
  •  梦谈多话
    2020-11-21 06:04

    Looks like the predefined fetch constants went away with the MySQL extension, so we need to add them before the first function...

    //predifined fetch constants

    define('MYSQL_BOTH',MYSQLI_BOTH);
    define('MYSQL_NUM',MYSQLI_NUM);
    define('MYSQL_ASSOC',MYSQLI_ASSOC);
    

    I tested and succeeded.

提交回复
热议问题