Full URL not working with php include

前端 未结 6 2004
闹比i
闹比i 2020-12-07 03:55

So, I am trying to insert a file with a php include, but for some reason it doesn\'t work with the full URL.

This works:

6条回答
  •  忘掉有多难
    2020-12-07 04:31

    An include tag is meant to be used to reference other PHP script files. If it is not a script that you are going to be processing, you might want to look into using:

    $FileContents = file_get_contents("http://www.domainname.com/menu.html");
    

提交回复
热议问题