PHP ini file_get_contents external url

后端 未结 7 1787
攒了一身酷
攒了一身酷 2020-11-22 15:28

I use following PHP function:

file_get_contents(\'http://example.com\');

Whenever I do this on a certain server, the result is empty. When I do

7条回答
  •  醉酒成梦
    2020-11-22 15:52

    The is related to the ini configuration setting allow_url_fopen.

    You should be aware that enable that option may make some bugs in your code exploitable.

    For instance, this failure to validate input may turn into a full-fledged remote code execution vulnerability:

    copy($_GET["file"], "."); 
    

提交回复
热议问题