Fatal error: Call to undefined function socket_create()

后端 未结 6 740
情深已故
情深已故 2020-12-01 09:15

My code is like this:

if( ($this->master=socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) < 0 )

    {
    die(\"socket_create() failed, reason: \".socket_s         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-01 09:24

    Open the php.ini file in your server environment and remove ; from ;extension=sockets. if it's doesn't work, you have to download the socket extension for PHP and put it into ext directory in the php installation path. Restart your http server and everything should work.

提交回复
热议问题