分页: 1/160 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]

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
Tags: ,

shc 加密Shell 脚本

[ 2010/09/01 09:41 | by selboo ]



下载安装 shc
wget ftp://ftp.pbone.net/mirror/ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el4/en/i386/RPMS.dag/shc-3.8.6-1.el4.rf.i386.rpm

加密Shell
[code][root@GameDB shc]# cat rsync.sh
#!/bin/bash
rsync -avz --delete 192.168.1.10::data /data/
[root@GameDB shc]# shc -rvf rsync.sh
shc shll=bash
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc&
Tags:

rpm 包制作 bind包

[ 2010/09/01 08:58 | by selboo ]

制作简单的rpm包

由于要装多台bind做DNS使用,一台一台编译很是麻烦,所以想到用源码包编写spec 来生成rpm包
环境:centos 5.4

操作如下: 准备工作

1.下载 bind9.6.2

2.cp bind9.6.2.tar.gz /usr/src/redhat//usr/src/redhat/SOURCES
编写spec
1.进入/usr/src/redhat/SPECS目录
2.编写bind.spec
Summary:        The Name Server Of DNS
Name:   bind
Version:        9.6.2
Release:      &nbs
Tags:

深入浅出Shell编程: Shell 变量

[ 2010/08/31 10:43 | by selboo ]





































表示方法描述
$n$1 表示第一个参数,$2 表示第二个参数 …
$#命令行参数的个数
$0当前程序的名称
$?前一个命令或函数的返回码
$*以”参数1 参数2 … ” 形式保存所有参数
$@以”参数1″ “参数2″ … 形式保存所有参数
$$本程序的(进程ID号)PID
$!上一个命令的PID
Tags:

缓存文件,大家用的最多的估计就是 return array();
实验证明,这种方法是较慢的,试考查以下的3个文件.
其一. $arr.php 直接返回 数组

[code]<?php
return Array
(
    "db_host1" => 123,
    "db_host2" => 123,
    "db_host3" => 123,
    "db_host4" => 123,
    "db_host5" => 123,
    "db_host6" => 123,<
Tags: ,
分页: 1/160 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]