How to include file outside document root?

前端 未结 7 503
臣服心动
臣服心动 2020-12-03 01:48

What I want do to is to include \'file1.php\' from \'domain1\' into \'file2.php\' on \'domain2\'. So what I figured I should do is something like this:

file2         


        
7条回答
  •  臣服心动
    2020-12-03 02:07

    What happens if you try to require a different file:

    // test.php
    
    
    // your file
    require_once('test.php');
    

    Does that work? If so, put test.php in the other location and try it again. Does it still work?

提交回复
热议问题