PHP file_get_contents does not work on localhost

前端 未结 7 1213
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 21:48

I am working on my website from localhost (http://172.16.65.1/) a MAMP server on OSX.
I want to load some JSON from Google and some simple tests show me I have a probl

7条回答
  •  抹茶落季
    2020-12-01 22:16

    In the second one you're trying to open a file named localhost in the current folder, which doesn't exist and hence throws an error. Use http://localhost instead. And to make that work, you're have to set allow_furl_open.

提交回复
热议问题