file_get_contents() gives a 502 error in the browser Permanently deleted user 创建于 2018年02月19日 14:47 I have xampp running on my pc and I have php running (echo works). When I try to get a webpage and echo it, it gives a 502 error
What URL do you see in the browser address bar when it happens?
It displays: localhost:66422/%projectname%/%filename%.php
You're trying to get the web page with the built-in PhpStorm web server, not XAMPP.
To make it work, please configure a project PHP interpreter at Settings | Languages & Frameworks | PHP. If it still doesn't work after that, please share the code.