Home  >  Q&A  >  body text

Why does it report an error when judging USER_ID after initialization?

360截图-15556060.jpg

富贵富贵2484 days ago1475

reply all(2)I'll reply

  • 电动小老虎

    电动小老虎2018-01-24 15:07:47

    I feel there are 2 errors. I don’t know if they are correct or not. Please refer to them.

    Error 1 The parent class is not initialized during initialization parnet::_initialize()

    Error 2 empty and is_null are two concepts. Can an empty data be converted into flase? One is a null value

    reply
    0
  • 庙凡

    庙凡2018-01-23 17:28:48

    The usage is wrong

    <?php
    define("GREETING","Hello world!",TRUE);
    echo constant("greeting");
    ?>

    Replace line 17 with it, try

    if(empty(constant('USER_ID')))

    reply
    0
  • Cancelreply