search

Home  >  Q&A  >  body text

The ___ROOT___ constant is not defined in thinkphp5.0.9, how to solve it

Use of undefined constant ROOT - assumed '__ROOT__'
This is an error message. I am new to 5.0 and I don’t know if the constants in 5.0 can be used. Can they be redefined?

大家讲道理大家讲道理2742 days ago1299

reply all(1)I'll reply

  • 扔个三星炸死你

    扔个三星炸死你2017-06-24 09:44:27

    tp5 needs to be defined by yourself

    直接在配置文件中添加:
    'parse_str'=>[
    '__PUBLIC__'=>'/public/',
    '__ROOT__' => '/',
    ]

    reply
    0
  • Cancelreply