Re: socket gives notice on server side(simple newbie code)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/20/2014 11:00 AM, Negin Nickparsa wrote:
echo "you entered ".$input;
if($stock[$input]!=NULL)
{
     $answer=$stock[$input];
     socket_write($sock,$answer, $port);

}
else{
     echo socket_strerror(0);
}

How about adding the following before the above lines:
if (!isset($stock[$input]))
   print_r($stock);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux