When I use this code in a php file in public_html not working :
$badwords = explode("\n", file_get_contents('bad.txt'));
but when i add my site url working this code working nice :
$badwords = explode("\n", file_get_contents('http://example.com/bad.txt'));
What's the problem?
please help me.
thank you.
使用file_get_contents()函数可以抓取其他站点的数据,因此大多数时间服务器不允许使用此函数,并且可能还会出现其他错误。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.