Warning: require_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0

前端 未结 9 1956
自闭症患者
自闭症患者 2020-12-02 15:44

I am trying to include a php file in a page via

  require_once(http://localhost/web/a.php)

I am getting an error

 Warning:         


        
9条回答
  •  旧巷少年郎
    2020-12-02 16:09

    require_once('../web/a.php');
    

    If this is not working for anyone, following is the good Idea to include file anywhere in the project.

    require_once dirname(__FILE__)."/../../includes/enter.php";
    

    This code will get the file from 2 directory outside of the current directory.

提交回复
热议问题