PHP fatal error: Uncaught exception 'Exception' with message

前端 未结 5 1894
清酒与你
清酒与你 2021-01-19 08:13

I have a PHP script that connects to an api and posts information to their systems, but when its trying to connect it throws a fatal error:

Fatal error: Unca         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-19 08:40

    I would suggest using curl instead of fopen(). curl is both more flexible, and more secure. Many servers disable allow_url_fopen, curl also fails more gracefully when there are problems on the remote server.

提交回复
热议问题