When phpsocket is programmed, when an error is reported, the error content is garbled ??

Source: Internet
Author: User
Phpsocket programming. When an error occurs, the error message is garbled: {code ...} I tried to switch the encoding (mb_convert_encoding) to UTF-8, gbk, gb2312, ISO-8859-1 and so on can not make him display normally, how can I display the error message normally ?? Php socket programming. When an error occurs, the error message is garbled:

Messages from the PHP client: hello boy error level: 2 error message: socket_write (): unable to write to socket [10057]: fig fig others) �������������������������������������� wrong File: D: \ web \ frontToolLib \ php \ socket_server.php error row: 88 error code: 10057 text description: The address is not provided because the socket is not connected and (when a sendto call sends a datagram socket, the request for sending or receiving data is not accepted.

I tried to switch the encoding (mb_convert_encoding) to UTF-8, gbk, gb2312, ISO-8859-1 and so on can not make him display normally, how can I display the error message normally ??

Reply content:

Php socket programming. When an error occurs, the error message is garbled:

Messages from the PHP client: hello boy error level: 2 error message: socket_write (): unable to write to socket [10057]: fig fig others) �������������������������������������� wrong File: D: \ web \ frontToolLib \ php \ socket_server.php error row: 88 error code: 10057 text description: The address is not provided because the socket is not connected and (when a sendto call sends a datagram socket, the request for sending or receiving data is not accepted.

I tried to switch the encoding (mb_convert_encoding) to UTF-8, gbk, gb2312, ISO-8859-1 and so on can not make him display normally, how can I display the error message normally ??

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.