Use of undefined constant

前端 未结 2 1414
生来不讨喜
生来不讨喜 2021-01-29 16:01

Hi I have this error in my website my website is wordpress 4 i use post format in post format i create this php to if page has quote post then dont load title and image and etc

2条回答
  •  梦毁少年i
    2021-01-29 16:32

    If you want to use the quote as a literal string (line 4), not a variable name, you must enclose it into single or double quote characters (' or "). Otherwise, PHP thinks that you're referencing a PHP constant.

    For reasons of backward compatibility, PHP falls back on using the string as literal, but it does throw an E_NOTICE error – the one you're experiencing.

提交回复
热议问题