get around allow_url_include=0 error

后端 未结 2 739
挽巷
挽巷 2021-02-10 08:58

I am trying to include a file from a url, however I get the following error thrown up.

Warning: include(): http:// wrapper is disabled in the server configuratio         


        
2条回答
  •  迷失自我
    2021-02-10 10:02

    I have had a similar issue.

    Considering 'Marc B's' post, it is clear that using absolute URLs is not a great idea, even if it is possible by editing the php.ini as 'ficuscr' states. I'm not sure this workaround will work for your specific situation as it still requires adjustments to each page depending on where it is in your folder structure, but it does makes things simpler if, like me, you have a lot of includes in your website.

    
    
    
    
    
    
    

    For me, this means if I move a page to another location in the folder structure, for example in a sub-folder of its current location, all I need to do is amend to become for example

提交回复
热议问题