Re: socket gives notice on server side(simple newbie code)
| From: | Jim Giner | Date: | Wed, 20 Aug 2014 15:09:52 +0000 |
| Subject: | Re: socket gives notice on server side(simple newbie code) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323752@lists.php.net to get a copy of this message | ||
On 8/20/2014 11:00 AM, Negin Nickparsa wrote:
echo "you entered ".$input; if($stock[$input]!=NULL) {How about adding the following before the above lines: if (!isset($stock[$input])) print_r($stock);$answer=$stock[$input]; socket_write($sock,$answer, $port);} else{echo socket_strerror(0);}