isset($argv[1]))
{
exit("use php client.php \$file_path\n");
}
// 上传文件路径
$file_to_transfer = trim(is_file($file_to_transfer))
{
exit("$file_to_transfer not exist\n");
}
// 建立socket连接
$client = stream_socket_client$client)
{
exit("$errmsg\n");
}
// 设置成阻塞
stream_set_blocking($client, 1);
// 文件名
$file_name = basenameisset($argv[1]))
{
exit("use php client.php \$file_path\n");
}
// 上传文件路径
$file_to_transfer = trim($client)
{
exit("$errmsg\n");
}
stream_set_blocking($client, 1);
// 文件名
$file_name = basename($file_to_transfer