php用socket上传图片
[ 2010/09/02 10:43 | by selboo ]
服务器端:
[code]<?php
set_time_limit(10);
//* 设置不显示任何错误 */
//error_reporting(0);
function varinfo($str) {
echo "<pre>";
var_dump($str);
echo "<pre>";
}
$commonProtocol = getprotobyname("tcp");
$socket = socket_create(AF_INET, SOCK_STREAM, $commonProtocol);
if ($socket) {
$result = socket_bind($socket, '192.168.3.57', 1337);
if ($resul[separ
[code]<?php
set_time_limit(10);
//* 设置不显示任何错误 */
//error_reporting(0);
function varinfo($str) {
echo "<pre>";
var_dump($str);
echo "<pre>";
}
$commonProtocol = getprotobyname("tcp");
$socket = socket_create(AF_INET, SOCK_STREAM, $commonProtocol);
if ($socket) {
$result = socket_bind($socket, '192.168.3.57', 1337);
if ($resul[separ