include_once, relative path in php

前端 未结 5 761
-上瘾入骨i
-上瘾入骨i 2021-01-18 02:36

I have 3 files: home, failed_attempt, login.

The file home and failed_attempt all refer to login file.

The annoying thing is that they throw a mistake saying

5条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 02:38

    Do something like require(dirname(__FILE__) . '[RELATIVE PATH HERE]');

提交回复
热议问题