2012-1-30 18:25 Monday  

可以把error.html设成404的内容,造成页面不存在的假像。

ErrorDocument 403 /error.html  
<Limit GET HEAD POST>
order allow,deny
deny from 58.14
deny from 58.15
deny from 58.16
deny from 58.17
deny from 58.18
deny from 58.19
deny from 58.20
deny from 58.21
deny from 58.22
deny from 58.23
deny from 58.24
deny from 58.25
deny from 58.30
deny from 58.31
deny from 58.32
deny from 58.33
deny from 58.34
deny from 58.35
deny from 58.36
deny from 58.37
deny from 58.38
deny from 58.39
deny from 58.40
deny from 58.41
deny from 58.42
deny from 58.43
deny from 58.44
deny from 58.45
deny from 58.46
deny from 58.47
deny from 58.48
deny from 58.49
deny from 58.50
deny from 58.51
deny from 58.52
deny from 58.53
deny from 58.54
deny from 58.55
deny from 58.56
deny from 58.57
deny from 58.58
deny from 58.59
deny from 58.60
deny from 58.61
deny from 58.62
deny from 58.63
deny from 58.66
deny from 58.67
deny from 58.82
deny from 58.83
deny from 58.87
deny from 58.100
deny from 58.101
deny from 58.116
deny from 58.117
deny from 58.118
deny from 58.119
deny from 58.128
deny from 58.129
deny from 58.130
deny from 58.131
deny from 58.132
deny from 58.133
deny from 58.134
deny from 58.135
deny from 58.144
deny from 58.192
deny from 58.193
deny from 58.194
deny from 58.195
deny from 58.196
deny from 58.197
deny from 58.200
deny from 58.201
deny from 58.202
deny from 58.203
deny from 58.204
deny from 58.205
deny from 58.206
deny from 58.207
deny from 58.208
deny from 58.209
deny from 58.210
deny from 58.211
deny from 58.212
deny from 58.213
deny from 58.214
deny from 58.215
deny from 58.216
deny from 58.217
deny from 58.218
deny from 58.219
deny from 58.220
deny from 58.221
deny from 58.222
deny from 58.223
deny from 58.240
deny from 58.241
deny from 58.242
deny from 58.243
deny from 58.244
deny from 58.245
deny from 58.246
deny from 58.247
deny from 58.248
deny from 58.249
deny from 58.250
deny from 58.251
deny from 58.252
deny from 58.253
deny from 58.254
deny from 58.255
deny from 59.32
deny from 59.33
deny from 59.34
deny from 59.35
deny from 59.36
deny from 59.37
deny from 59.38
deny from 59.39
deny from 59.40
deny from 59.41
deny from 59.42
deny from 59.43
deny from 59.44
deny from 59.45
deny from 59.46
deny from 59.47
deny from 59.48
deny from 59.49
deny from 59.50
deny from 59.51
deny from 59.52
deny from 59.53
deny from 59.54
deny from 59.55
deny from 59.56
deny from 59.57
deny from 59.58
deny from 59.59
deny from 59.60
deny from 59.61
deny from 59.62
deny from 59.63
deny from 59.64
deny from 59.65
deny from 59.66
deny from 59.67
deny from 59.68
deny from 59.69
deny from 59.70
deny from 59.71
deny from 59.72
deny from 59.73
deny from 59.74
deny from 59.75
deny from 59.76
deny from 59.77
deny from 59.78
deny from 59.79
deny from 59.80
deny from 59.81
deny from 59.82
deny from 59.83
deny from 59.107
deny from 59.108
deny from 59.109
deny from 59.151
deny from 59.191
deny from 60.13
deny from 60.14
deny from 60.15
deny from 60.16
deny from 60.17
deny from 60.18
deny from 60.19
deny from 60.20
deny from 60.21
deny from 60.22
deny from 60.23
deny from 60.24
deny from 60.25
deny from 60.26
deny from 60.27
deny from 60.28
deny from 60.29
deny from 60.30
deny from 60.31
deny from 60.55
deny from 60.63
deny from 60.160
deny from 60.161
deny from 60.162
deny from 60.163
deny from 60.164
deny from 60.165
deny from 60.166
deny from 60.167
deny from 60.168
deny from 60.169
deny from 60.170
deny from 60.171
deny from 60.172
deny from 60.173
deny from 60.174
deny from 60.175
deny from 60.176
deny from 60.177
deny from 60.178
deny from 60.179
deny from 60.180
deny from 60.181
deny from 60.182
deny from 60.183
deny from 60.184
deny from 60.185
deny from 60.186
deny from 60.187
deny from 60.188
deny from 60.189
deny from 60.190
deny from 60.191
deny from 60.194
deny from 60.195
deny from 60.200
deny from 60.201
deny from 60.202
deny from 60.203
deny from 60.204
deny from 60.208
deny from 60.209
deny from 60.210
deny from 60.211
deny from 60.212
deny from 60.213
deny from 60.214
deny from 60.215
deny from 60.216
deny from 60.217
deny from 60.218
deny from 60.219
deny from 60.220
deny from 60.221
deny from 60.222
deny from 60.223
deny from 60.232
deny from 60.233
deny from 60.255
deny from 61.14
deny from 61.14
deny from 61.28
deny from 61.29
deny from 61.45
deny from 61.47
deny from 61.48
deny from 61.49
deny from 61.50
deny from 61.51
deny from 61.52
deny from 61.53
deny from 61.54
deny from 61.55
deny from 61.128
deny from 61.129
deny from 61.130
deny from 61.131
deny from 61.132
deny from 61.133
deny from 61.134
deny from 61.135
deny from 61.136
deny from 61.137
deny from 61.138
deny from 61.139
deny from 61.140
deny from 61.141
deny from 61.142
deny from 61.143
deny from 61.144
deny from 61.145
deny from 61.146
deny from 61.147
deny from 61.148
deny from 61.149
deny from 61.150
deny from 61.151
deny from 61.152
deny from 61.153
deny from 61.154
deny from 61.155
deny from 61.156
deny from 61.157
deny from 61.158
deny from 61.159
deny from 61.160
deny from 61.161
deny from 61.161
deny from 61.161
deny from 61.162
deny from 61.163
deny from 61.164
deny from 61.165
deny from 61.166
deny from 61.167
deny from 61.168
deny from 61.169
deny from 61.170
deny from 61.171
deny from 61.172
deny from 61.173
deny from 61.174
deny from 61.175
deny from 61.176
deny from 61.177
deny from 61.178
deny from 61.179
deny from 61.180
deny from 61.181
deny from 61.182
deny from 61.183
deny from 61.184
deny from 61.185
deny from 61.186
deny from 61.187
deny from 61.188
deny from 61.189
deny from 61.190
deny from 61.191
deny from 61.216
deny from 61.232
deny from 61.233
deny from 61.234
deny from 61.235
deny from 61.236
deny from 61.237
deny from 61.240
deny from 61.241
deny from 61.242
deny from 61.243
deny from 62.159
deny from 62.159
deny from 63.162
deny from 64.34
deny from 80.146
deny from 80.255
deny from 121.4
deny from 121.5
deny from 121.8
deny from 121.9
deny from 121.10
deny from 121.11
deny from 121.12
deny from 121.13
deny from 121.14
deny from 121.15
deny from 121.16
deny from 121.17
deny from 121.18
deny from 121.19
deny from 121.20
deny from 121.21
deny from 121.22
deny from 121.23
deny from 121.24
deny from 121.25
deny from 121.26
deny from 121.27
deny from 121.28
deny from 121.29
deny from 121.32
deny from 121.33
deny from 121.34
deny from 121.35
deny from 121.36
deny from 121.40
deny from 121.41
deny from 121.42
deny from 121.43
deny from 122.0
deny from 122.1
deny from 122.2
deny from 122.3
deny from 122.4
deny from 122.5
deny from 122.6
deny from 122.7
deny from 122.8
deny from 122.9
deny from 122.10
deny from 122.11
deny from 122.12
deny from 122.13
deny from 122.14
deny from 122.15
deny from 122.16
deny from 122.17
deny from 122.18
deny from 122.19
deny from 122.20
deny from 122.21
deny from 122.22
deny from 122.23
deny from 122.24
deny from 122.25
deny from 122.26
deny from 122.27
deny from 122.28
deny from 122.29
deny from 122.30
deny from 122.31
deny from 122.32
deny from 122.33
deny from 122.34
deny from 122.35
deny from 122.36
deny from 122.37
deny from 122.38
deny from 122.39
deny from 122.40
deny from 122.41
deny from 122.42
deny from 122.43
deny from 122.44
deny from 122.45
deny from 122.46
deny from 122.47
deny from 122.48
deny from 122.49
deny from 122.50
deny from 122.51
deny from 122.52
deny from 122.53
deny from 122.54
deny from 122.55
deny from 122.56
deny from 122.57
deny from 122.58
deny from 122.59
deny from 122.60
deny from 122.61
deny from 122.62
deny from 122.63
deny from 122.64
deny from 122.65
deny from 122.66
deny from 122.67
deny from 122.68
deny from 122.69
deny from 122.70
deny from 122.71
deny from 122.72
deny from 122.73
deny from 122.74
deny from 122.75
deny from 122.76
deny from 122.77
deny from 122.78
deny from 122.79
deny from 122.80
deny from 122.81
deny from 122.82
deny from 122.83
deny from 122.84
deny from 122.85
deny from 122.86
deny from 122.87
deny from 122.88
deny from 122.89
deny from 122.90
deny from 122.91
deny from 122.92
deny from 122.93
deny from 122.94
deny from 122.95
deny from 122.96
deny from 122.97
deny from 122.98
deny from 122.99
deny from 122.100
deny from 122.101
deny from 122.102
deny from 122.103
deny from 122.104
deny from 122.105
deny from 122.106
deny from 122.107
deny from 122.108
deny from 122.109
deny from 122.110
deny from 122.111
deny from 122.112
deny from 122.113
deny from 122.114
deny from 122.115
deny from 122.116
deny from 122.117
deny from 122.118
deny from 122.119
deny from 122.120
deny from 122.121
deny from 122.122
deny from 122.123
deny from 122.124
deny from 122.125
deny from 122.126
deny from 122.127
deny from 122.128
deny from 122.129
deny from 122.130
deny from 122.131
deny from 122.132
deny from 122.133
deny from 122.134
deny from 122.135
deny from 122.136
deny from 122.137
deny from 122.138
deny from 122.139
deny from 122.140
deny from 122.141
deny from 122.142
deny from 122.143
deny from 122.144
deny from 122.145
deny from 122.146
deny from 122.147
deny from 122.148
deny from 122.149
deny from 122.150
deny from 122.151
deny from 122.152
deny from 122.153
deny from 122.154
deny from 122.155
deny from 122.156
deny from 122.157
deny from 122.158
deny from 122.159
deny from 122.160
deny from 122.161
deny from 122.162
deny from 122.163
deny from 122.164
deny from 122.165
deny from 122.166
deny from 122.167
deny from 122.168
deny from 122.169
deny from 122.170
deny from 122.171
deny from 122.172
deny from 122.173
deny from 122.174
deny from 122.175
deny from 122.176
deny from 122.177
deny from 122.178
deny from 122.179
deny from 122.180
deny from 122.181
deny from 122.182
deny from 122.183
deny from 122.184
deny from 122.185
deny from 122.186
deny from 122.187
deny from 122.188
deny from 122.189
deny from 122.190
deny from 122.191
deny from 122.192
deny from 122.193
deny from 122.194
deny from 122.195
deny from 122.196
deny from 122.197
deny from 122.198
deny from 122.199
deny from 122.200
deny from 122.201
deny from 122.202
deny from 122.203
deny from 122.204
deny from 122.205
deny from 122.206
deny from 122.207
deny from 122.208
deny from 122.209
deny from 122.210
deny from 122.211
deny from 122.212
deny from 122.213
deny from 122.214
deny from 122.215
deny from 122.216
deny from 122.217
deny from 122.218
deny from 122.219
deny from 122.220
deny from 122.221
deny from 122.222
deny from 122.223
deny from 122.224
deny from 122.225
deny from 122.226
deny from 122.227
deny from 122.228
deny from 122.229
deny from 122.230
deny from 122.231
deny from 122.232
deny from 122.233
deny from 122.234
deny from 122.235
deny from 122.236
deny from 122.237
deny from 122.238
deny from 122.239
deny from 122.240
deny from 122.241
deny from 122.242
deny from 122.243
deny from 122.244
deny from 122.245
deny from 122.246
deny from 122.247
deny from 122.248
deny from 122.249
deny from 122.250
deny from 122.251
deny from 122.252
deny from 122.253
deny from 122.254
deny from 122.255
deny from 124.6
deny from 124.16
deny from 124.17
deny from 124.20
deny from 124.21
deny from 124.29
deny from 124.40
deny from 124.42
deny from 124.47
deny from 124.64
deny from 124.65
deny from 124.72
deny from 124.73
deny from 124.74
deny from 124.75
deny from 124.76
deny from 124.77
deny from 124.78
deny from 124.79
deny from 124.88
deny from 124.89
deny from 124.90
deny from 124.91
deny from 124.92
deny from 124.93
deny from 124.94
deny from 124.95
deny from 124.108
deny from 124.112
deny from 124.113
deny from 124.114
deny from 124.115
deny from 124.116
deny from 124.117
deny from 124.118
deny from 124.119
deny from 124.128
deny from 124.129
deny from 124.130
deny from 124.131
deny from 124.132
deny from 124.133
deny from 124.134
deny from 124.135
deny from 124.147
deny from 124.156
deny from 124.160
deny from 124.161
deny from 124.162
deny from 124.172
deny from 124.173
deny from 124.192
deny from 124.193
deny from 124.196
deny from 124.200
deny from 124.201
deny from 124.202
deny from 124.203
deny from 124.204
deny from 124.205
deny from 124.206
deny from 124.207
deny from 124.220
deny from 124.221
deny from 124.222
deny from 124.223
deny from 124.224
deny from 124.226
deny from 124.227
deny from 124.228
deny from 124.229
deny from 124.230
deny from 124.231
deny from 124.232
deny from 124.233
deny from 124.240
deny from 124.242
deny from 124.243
deny from 124.248
deny from 124.249
deny from 124.250
deny from 124.251
deny from 124.254
deny from 125.31
deny from 125.32
deny from 125.33
deny from 125.34
deny from 125.35
deny from 125.36
deny from 125.37
deny from 125.38
deny from 125.39
deny from 125.40
deny from 125.41
deny from 125.42
deny from 125.43
deny from 125.44
deny from 125.45
deny from 125.46
deny from 125.47
deny from 125.58
deny from 125.62
deny from 125.64
deny from 125.65
deny from 125.66
deny from 125.67
deny from 125.68
deny from 125.69
deny from 125.70
deny from 125.71
deny from 125.72
deny from 125.73
deny from 125.74
deny from 125.75
deny from 125.76
deny from 125.77
deny from 125.78
deny from 125.79
deny from 125.80
deny from 125.81
deny from 125.82
deny from 125.83
deny from 125.84
deny from 125.85
deny from 125.86
deny from 125.87
deny from 125.88
deny from 125.89
deny from 125.90
deny from 125.91
deny from 125.92
deny from 125.93
deny from 125.94
deny from 125.95
deny from 125.96
deny from 125.97
deny from 125.98
deny from 125.104
deny from 125.105
deny from 125.106
deny from 125.107
deny from 125.108
deny from 125.109
deny from 125.110
deny from 125.111
deny from 125.112
deny from 125.113
deny from 125.114
deny from 125.115
deny from 125.116
deny from 125.117
deny from 125.118
deny from 125.119
deny from 125.120
deny from 125.121
deny from 125.122
deny from 125.123
deny from 125.124
deny from 125.125
deny from 125.126
deny from 125.127
deny from 125.171
deny from 125.208
deny from 125.210
deny from 125.213
deny from 125.215
deny from 125.216
deny from 125.217
deny from 125.218
deny from 125.219
deny from 125.220
deny from 125.221
deny from 125.222
deny from 125.223
deny from 125.254
deny from 134.196
deny from 147.243
deny from 159.226
deny from 161.207
deny from 162.105
deny from 166.111
deny from 167.139
deny from 168.160
deny from 192.83
deny from 192.124
deny from 192.188
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 194.117
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 195.112
deny from 198.17
deny from 202.0
deny from 202.2
deny from 202.4
deny from 202.4
deny from 202.8
deny from 202.10
deny from 202.14
deny from 202.14
deny from 202.20
deny from 202.22
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.38
deny from 202.41
deny from 202.41
deny from 202.41
deny from 202.43
deny from 202.46
deny from 202.46
deny from 202.60
deny from 202.63
deny from 202.69
deny from 202.69
deny from 202.70
deny from 202.70
deny from 202.74
deny from 202.75
deny from 202.77
deny from 202.85
deny from 202.89
deny from 202.90
deny from 202.90
deny from 202.90
deny from 202.91
deny from 202.91
deny from 202.91
deny from 202.92
deny from 202.92
deny from 202.93
deny from 202.93
deny from 202.94
deny from 202.95
deny from 202.95
deny from 202.96
deny from 202.97
deny from 202.98
deny from 202.99
deny from 202.100
deny from 202.101
deny from 202.102
deny from 202.103
deny from 202.104
deny from 202.105
deny from 202.106
deny from 202.107
deny from 202.108
deny from 202.109
deny from 202.110
deny from 202.111
deny from 202.112
deny from 202.113
deny from 202.114
deny from 202.115
deny from 202.116
deny from 202.117
deny from 202.118
deny from 202.119
deny from 202.120
deny from 202.120
deny from 202.121
deny from 202.122
deny from 202.122
deny from 202.122
deny from 202.122
deny from 202.122
deny from 202.123
deny from 202.125
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.127
deny from 202.130
deny from 202.130
deny from 202.131
deny from 202.131
deny from 202.131
deny from 202.136
deny from 202.136
deny from 202.136
deny from 202.141
deny from 202.142
deny from 202.143
deny from 202.148
deny from 202.149
deny from 202.149
deny from 202.150
deny from 202.152
deny from 202.153
deny from 202.158
deny from 202.160
deny from 202.164
deny from 202.165
deny from 202.168
deny from 202.170
deny from 202.170
deny from 202.173
deny from 202.173
deny from 202.176
deny from 202.179
deny from 202.180
deny from 202.181
deny from 202.189
deny from 202.192
deny from 202.192
deny from 202.193
deny from 202.194
deny from 202.195
deny from 202.196
deny from 202.197
deny from 202.198
deny from 202.199
deny from 202.200
deny from 202.201
deny from 202.202
deny from 202.203
deny from 202.204
deny from 202.205
deny from 202.206
deny from 202.207
deny from 203.79
deny from 203.80
deny from 203.81
deny from 203.83
deny from 203.86
deny from 203.88
deny from 203.88
deny from 203.89
deny from 203.90
deny from 203.90
deny from 203.91
deny from 203.91
deny from 203.91
deny from 203.92
deny from 203.92
deny from 203.93
deny from 203.94
deny from 203.95
deny from 203.95
deny from 203.98
deny from 203.98
deny from 203.98
deny from 203.98
deny from 203.99
deny from 203.99
deny from 203.100
deny from 203.100
deny from 203.100
deny from 203.110
deny from 203.118
deny from 203.119
deny from 203.128
deny from 203.128
deny from 203.130
deny from 203.132
deny from 203.134
deny from 203.135
deny from 203.135
deny from 203.142
deny from 203.148
deny from 203.152
deny from 203.156
deny from 203.158
deny from 203.161
deny from 203.166
deny from 203.171
deny from 203.174
deny from 203.175
deny from 203.175
deny from 203.184
deny from 203.187
deny from 203.190
deny from 203.191
deny from 203.191
deny from 203.191
deny from 203.192
deny from 203.194
deny from 203.196
deny from 203.207
deny from 203.208
deny from 203.208
deny from 203.209
deny from 203.212
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 203.222
deny from 208.18
deny from 210.5
deny from 210.5
deny from 210.12
deny from 210.13
deny from 210.14
deny from 210.14
deny from 210.15
deny from 210.16
deny from 210.21
deny from 210.22
deny from 210.25
deny from 210.26
deny from 210.27
deny from 210.28
deny from 210.29
deny from 210.30
deny from 210.31
deny from 210.31
deny from 210.32
deny from 210.33
deny from 210.34
deny from 210.35
deny from 210.36
deny from 210.37
deny from 210.38
deny from 210.39
deny from 210.40
deny from 210.41
deny from 210.42
deny from 210.43
deny from 210.44
deny from 210.45
deny from 210.46
deny from 210.47
deny from 210.51
deny from 210.52
deny from 210.53
deny from 210.56
deny from 210.72
deny from 210.73
deny from 210.74
deny from 210.75
deny from 210.76
deny from 210.77
deny from 210.78
deny from 210.79
deny from 210.79
deny from 210.82
deny from 210.83
deny from 210.87
deny from 210.185
deny from 210.192
deny from 210.211
deny from 211.64
deny from 211.65
deny from 211.66
deny from 211.67
deny from 211.68
deny from 211.69
deny from 211.70
deny from 211.71
deny from 211.80
deny from 211.81
deny from 211.82
deny from 211.83
deny from 211.84
deny from 211.85
deny from 211.86
deny from 211.87
deny from 211.88
deny from 211.89
deny from 211.90
deny from 211.91
deny from 211.92
deny from 211.93
deny from 211.94
deny from 211.95
deny from 211.96
deny from 211.97
deny from 211.98
deny from 211.99
deny from 211.100
deny from 211.101
deny from 211.102
deny from 211.103
deny from 211.136
deny from 211.137
deny from 211.138
deny from 211.139
deny from 211.140
deny from 211.141
deny from 211.142
deny from 211.143
deny from 211.144
deny from 211.145
deny from 211.146
deny from 211.147
deny from 211.148
deny from 211.149
deny from 211.150
deny from 211.151
deny from 211.152
deny from 211.153
deny from 211.154
deny from 211.155
deny from 211.156
deny from 211.157
deny from 211.158
deny from 211.159
deny from 211.160
deny from 211.161
deny from 211.162
deny from 211.163
deny from 211.164
deny from 211.165
deny from 211.166
deny from 211.167
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.63
deny from 212.184
deny from 216.139
deny from 216.179
deny from 217.8
deny from 217.243
deny from 217.244
deny from 218.0
deny from 218.1
deny from 218.2
deny from 218.3
deny from 218.4
deny from 218.5
deny from 218.6
deny from 218.7
deny from 218.8
deny from 218.9
deny from 218.10
deny from 218.11
deny from 218.12
deny from 218.13
deny from 218.14
deny from 218.15
deny from 218.16
deny from 218.17
deny from 218.18
deny from 218.19
deny from 218.20
deny from 218.21
deny from 218.22
deny from 218.23
deny from 218.24
deny from 218.25
deny from 218.26
deny from 218.27
deny from 218.28
deny from 218.29
deny from 218.30
deny from 218.31
deny from 218.56
deny from 218.57
deny from 218.58
deny from 218.59
deny from 218.60
deny from 218.61
deny from 218.62
deny from 218.63
deny from 218.64
deny from 218.65
deny from 218.66
deny from 218.67
deny from 218.68
deny from 218.69
deny from 218.70
deny from 218.71
deny from 218.72
deny from 218.73
deny from 218.74
deny from 218.75
deny from 218.76
deny from 218.77
deny from 218.78
deny from 218.79
deny from 218.80
deny from 218.81
deny from 218.82
deny from 218.83
deny from 218.84
deny from 218.85
deny from 218.86
deny from 218.87
deny from 218.88
deny from 218.89
deny from 218.90
deny from 218.91
deny from 218.92
deny from 218.93
deny from 218.94
deny from 218.95
deny from 218.96
deny from 218.97
deny from 218.98
deny from 218.99
deny from 218.104
deny from 218.105
deny from 218.106
deny from 218.107
deny from 218.108
deny from 218.109
deny from 218.185
deny from 218.192
deny from 218.193
deny from 218.194
deny from 218.195
deny from 218.196
deny from 218.197
deny from 218.198
deny from 218.199
deny from 218.200
deny from 218.201
deny from 218.202
deny from 218.203
deny from 218.204
deny from 218.205
deny from 218.206
deny from 218.207
deny from 218.240
deny from 218.241
deny from 218.242
deny from 218.243
deny from 218.244
deny from 218.245
deny from 218.246
deny from 218.247
deny from 218.249
deny from 219.72
deny from 219.82
deny from 219.128
deny from 219.129
deny from 219.130
deny from 219.131
deny from 219.132
deny from 219.133
deny from 219.134
deny from 219.135
deny from 219.136
deny from 219.137
deny from 219.138
deny from 219.139
deny from 219.140
deny from 219.141
deny from 219.142
deny from 219.143
deny from 219.144
deny from 219.145
deny from 219.146
deny from 219.147
deny from 219.148
deny from 219.149
deny from 219.150
deny from 219.151
deny from 219.152
deny from 219.153
deny from 219.154
deny from 219.155
deny from 219.156
deny from 219.157
deny from 219.158
deny from 219.159
deny from 219.216
deny from 219.217
deny from 219.218
deny from 219.219
deny from 219.220
deny from 219.221
deny from 219.222
deny from 219.223
deny from 219.224
deny from 219.225
deny from 219.226
deny from 219.227
deny from 219.228
deny from 219.229
deny from 219.230
deny from 219.231
deny from 219.232
deny from 219.233
deny from 219.234
deny from 219.235
deny from 219.236
deny from 219.237
deny from 219.238
deny from 219.239
deny from 219.242
deny from 219.243
deny from 219.244
deny from 219.245
deny from 219.246
deny from 219.247
deny from 220.101
deny from 220.112
deny from 220.113
deny from 220.114
deny from 220.115
deny from 220.160
deny from 220.161
deny from 220.162
deny from 220.163
deny from 220.164
deny from 220.165
deny from 220.166
deny from 220.167
deny from 220.168
deny from 220.169
deny from 220.170
deny from 220.171
deny from 220.172
deny from 220.173
deny from 220.174
deny from 220.175
deny from 220.176
deny from 220.177
deny from 220.178
deny from 220.179
deny from 220.180
deny from 220.181
deny from 220.182
deny from 220.183
deny from 220.184
deny from 220.185
deny from 220.186
deny from 220.187
deny from 220.188
deny from 220.189
deny from 220.190
deny from 220.191
deny from 220.192
deny from 220.193
deny from 220.194
deny from 220.195
deny from 220.196
deny from 220.197
deny from 220.198
deny from 220.199
deny from 220.200
deny from 220.201
deny from 220.202
deny from 220.203
deny from 220.204
deny from 220.205
deny from 220.206
deny from 220.207
deny from 220.231
deny from 220.231
deny from 220.232
deny from 220.234
deny from 220.248
deny from 220.249
deny from 220.250
deny from 220.251
deny from 220.252
deny from 221.0
deny from 221.1
deny from 221.2
deny from 221.3
deny from 221.4
deny from 221.5
deny from 221.6
deny from 221.7
deny from 221.8
deny from 221.9
deny from 221.10
deny from 221.11
deny from 221.12
deny from 221.13
deny from 221.14
deny from 221.15
deny from 221.122
deny from 221.123
deny from 221.129
deny from 221.130
deny from 221.131
deny from 221.136
deny from 221.137
deny from 221.172
deny from 221.173
deny from 221.174
deny from 221.175
deny from 221.176
deny from 221.177
deny from 221.178
deny from 221.179
deny from 221.180
deny from 221.181
deny from 221.182
deny from 221.183
deny from 221.192
deny from 221.193
deny from 221.194
deny from 221.195
deny from 221.196
deny from 221.197
deny from 221.198
deny from 221.199
deny from 221.200
deny from 221.201
deny from 221.202
deny from 221.203
deny from 221.204
deny from 221.205
deny from 221.206
deny from 221.207
deny from 221.208
deny from 221.209
deny from 221.210
deny from 221.211
deny from 221.212
deny from 221.213
deny from 221.214
deny from 221.215
deny from 221.216
deny from 221.217
deny from 221.218
deny from 221.219
deny from 221.220
deny from 221.221
deny from 221.222
deny from 221.223
deny from 221.224
deny from 221.225
deny from 221.226
deny from 221.227
deny from 221.228
deny from 221.229
deny from 221.230
deny from 221.231
deny from 221.232
deny from 221.233
deny from 221.234
deny from 221.235
deny from 221.236
deny from 221.237
deny from 221.238
deny from 221.239
deny from 222.16
deny from 222.17
deny from 222.18
deny from 222.19
deny from 222.20
deny from 222.21
deny from 222.22
deny from 222.23
deny from 222.24
deny from 222.25
deny from 222.26
deny from 222.27
deny from 222.28
deny from 222.29
deny from 222.30
deny from 222.31
deny from 222.32
deny from 222.33
deny from 222.34
deny from 222.35
deny from 222.36
deny from 222.37
deny from 222.38
deny from 222.39
deny from 222.40
deny from 222.41
deny from 222.42
deny from 222.43
deny from 222.44
deny from 222.45
deny from 222.46
deny from 222.47
deny from 222.48
deny from 222.49
deny from 222.50
deny from 222.51
deny from 222.52
deny from 222.53
deny from 222.54
deny from 222.55
deny from 222.56
deny from 222.57
deny from 222.58
deny from 222.59
deny from 222.60
deny from 222.61
deny from 222.62
deny from 222.63
deny from 222.64
deny from 222.65
deny from 222.66
deny from 222.67
deny from 222.68
deny from 222.69
deny from 222.70
deny from 222.71
deny from 222.72
deny from 222.73
deny from 222.74
deny from 222.75
deny from 222.76
deny from 222.77
deny from 222.78
deny from 222.79
deny from 222.80
deny from 222.81
deny from 222.82
deny from 222.83
deny from 222.84
deny from 222.85
deny from 222.86
deny from 222.87
deny from 222.88
deny from 222.89
deny from 222.90
deny from 222.91
deny from 222.92
deny from 222.93
deny from 222.94
deny from 222.95
deny from 222.125
deny from 222.128
deny from 222.129
deny from 222.130
deny from 222.131
deny from 222.132
deny from 222.133
deny from 222.134
deny from 222.135
deny from 222.136
deny from 222.137
deny from 222.138
deny from 222.139
deny from 222.140
deny from 222.141
deny from 222.142
deny from 222.143
deny from 222.160
deny from 222.161
deny from 222.162
deny from 222.163
deny from 222.168
deny from 222.169
deny from 222.170
deny from 222.171
deny from 222.172
deny from 222.173
deny from 222.174
deny from 222.175
deny from 222.176
deny from 222.177
deny from 222.178
deny from 222.179
deny from 222.180
deny from 222.181
deny from 222.182
deny from 222.183
deny from 222.184
deny from 222.185
deny from 222.186
deny from 222.187
deny from 222.188
deny from 222.189
deny from 222.190
deny from 222.191
deny from 222.192
deny from 222.193
deny from 222.194
deny from 222.195
deny from 222.196
deny from 222.197
deny from 222.198
deny from 222.199
deny from 222.200
deny from 222.201
deny from 222.202
deny from 222.203
deny from 222.204
deny from 222.205
deny from 222.206
deny from 222.207
deny from 222.208
deny from 222.209
deny from 222.210
deny from 222.211
deny from 222.212
deny from 222.213
deny from 222.214
deny from 222.215
deny from 222.216
deny from 222.217
deny from 222.218
deny from 222.219
deny from 222.220
deny from 222.221
deny from 222.222
deny from 222.223
deny from 222.240
deny from 222.241
deny from 222.242
deny from 222.243
deny from 222.244
deny from 222.245
deny from 222.246
deny from 222.247
deny from 222.248
deny from 222.249
allow from all
</LIMIT>

2012-1-30 18:24 Monday  

今天更新了一下smarty到3.0,结果发现项目中的__autoload()不能用了,原来是因为smarty改变了autoload的方式。

解决方法如下:

function autoload($className){
    if (file_exists(SITEROOT.'include/module/'.$className.'.class.php'))
    include SITEROOT.'include/module/'.$className.'.class.php';
    else
    die('类'.$className.'文件不存在');
}
spl_autoload_register("autoload");

用上面的方式还可以依顺序同时载入几个autoload方法哦

AMP环境是用yum安装,CentOS系统,telnet memcached正常。PHP的memcache模块及socket都正常

分析后发现系统SeLinux开启,httpd只能访问443,80端口。

找到原因后就好办了,关闭SElinux就可以了。

修改/etc/selinux/config

SELINUX=disabled

重启系统或执行:

setenforce 0

搞定,泡茶或继续干活。

==========

以下介绍一下SELinux相关的工具

/usr/bin/setenforce 修改SELinux的实时运行模式
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式
如果要彻底禁用SELinux 需要在/etc/sysconfig/selinux中设置参数selinux=0 ,或者在/etc/grub.conf中添加这个参数
/usr/bin/setstatus -v
察看系统的状态
以下是运行输出,请参考
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Policy version: 18

以上转自http://www.82cs.com/201001/07/php_fsockopen_connect_memcached_permission-denied/

2012-1-30 18:23 Monday  
mysqlcheck -A -r -c -p
输入密码来修复就可以了
    -A    检查所有数据库中的所有表
    -c    检查表的错误
    -r    可以修复大部分问题的修复(如果不赶时间的话,可考虑-e参数代替)
    -o    优化表(如果表太大,写操作比较频繁的话,可能会花较长时间)
    -p    指定加密码
2012-1-30 18:22 Monday  

方法一,首先修改 httpd.conf 配置文件:
vi /etc/httpd/conf/httpd.conf
查找 Options Indexes FollowSymLinks,修改为 Options -Indexes。
 


 
方法二,在www 目录下的修改 .htaccess 配置文件:
加入 Options -Indexes

2012-1-30 18:22 Monday  
win 2000/xp系统,运行“CMD”,在命提示行下输入 ftp 回车,进入ftp命令提示行,用 open 命令连接ftp,以连接白白网的ftp为例:
ftp> open ftp.szele.net,
Connected to ftp.szele.net,
注:表示已连接上,后面还有一些欢迎之类的信息。
User (ftp.szele.net:(none)):
注:提示输入用户名
331 User name okay, need password.
Password:
注:提示用户名正确,请输入密码。
230 User logged in, proceed.
出现这个提示时表示你已经成功登陆。
输入格式命令修改密码。
ftp> quote site pswd 老密码 新密码
回车后提示:
230 Password changed okay.
密码已修改成功。
530 Cannot change password.
表示你不能修改密码。
2012-1-30 18:21 Monday  

Windows下的Memcache安装
1. 下载memcache的windows稳定版,解压放某个盘下面,比如在c:\memcached
2. 在终端(也即cmd命令界面)下输入 ‘c:\memcached\memcached.exe -d install’ 安装
3. 再输入: ‘c:\memcached\memcached.exe -d start’ 启动。NOTE: 以后memcached将作为windows的一个服务每次开机时自动启动。这样服务器端已经安装完毕了。
4.下载php_memcache.dll,请自己查找对应的php版本的文件
5. 在C:\winnt\php.ini 加入一行 ‘extension=php_memcache.dll’
6.重新启动Apache,然后查看一下phpinfo,如果有memcache,那么就说明安装成功!

memcached的基本设置

-p 监听的端口
-l 连接的IP地址, 默认是本机
-d start 启动memcached服务
-d restart 重起memcached服务
-d stop|shutdown 关闭正在运行的memcached服务
-d install 安装memcached服务
-d uninstall 卸载memcached服务
-u 以的身份运行 (仅在以root运行的时候有效)
-m 最大内存使用,单位MB。默认64MB
-M 内存耗尽时返回错误,而不是删除项
-c 最大同时连接数,默认是1024
-f 块大小增长因子,默认是1.25
-n 最小分配空间,key+value+flags默认是48
-h 显示帮助

php_Memcache.dll PHP组件下载 http://www.php100.com/html/download/server/2010/0125/3858.html

Memcache Win32 1.2.1 下载 http://www.php100.com/html/download/server/2010/0125/3857.html 

Memcache环境测试
运行下面的php文件,如果有输出This is a test!,就表示环境搭建成功。开始领略Memcache的魅力把!
< ?php
$mem = new Memcache;
$mem->connect(”127.0.0.1″, 11211);
$mem->set(’key’, ‘This is a test!’, 0, 60);
$val = $mem->get(’key’);
echo $val;
?>

 

方法。

< ?php
//连接
$mem = new Memcache;
$mem->connect("192.168.0.200", 12000);
//具体端口可以通过phpinfo() 查看
//保存数据
$mem->set('key1', 'This is first value', 0, 60);
$val = $mem->get('key1');
echo "Get key1 value: " . $val ."<br />";

//替换数据
$mem->replace('key1', 'This is replace value', 0, 60);
$val = $mem->get('key1');
echo "Get key1 value: " . $val . "<br />";

//保存数组
$arr = array('aaa', 'bbb', 'ccc', 'ddd');
$mem->set('key2', $arr, 0, 60);
$val2 = $mem->get('key2');
echo "Get key2 value: ";
print_r($val2);
echo "<br />";

//删除数据
$mem->delete('key1');
$val = $mem->get('key1');
echo "Get key1 value: " . $val . "<br />";

//清除所有数据
$mem->flush();
$val2 = $mem->get('key2');
echo "Get key2 value: ";
print_r($val2);
echo "<br />";

//关闭连接
$mem->close();
?>

 

如果正常的话,浏览器将输出:
Get key1 value: This is first value
Get key1 value: This is replace value
Get key2 value: Array ( [0] => aaa [1] => bbb [2] => ccc [3] => ddd )
Get key1 value:
Get key2 value:

程序代码分析

初始化一个Memcache的对象:
$mem = new Memcache;

连接到我们的Memcache服务器端,第一个参数是服务器的IP地址,也可以是主机名,第二个参数是Memcache的开放的端口:
$mem->connect("192.168.0.200", 12000);

保存一个数据到Memcache服务器上,第一个参数是数据的key,用来定位一个数据,第二个参数是需要保存的数据内容,这里是一个字符串,第三 个参数是一个标记,一般设置为0或者MEMCACHE_COMPRESSED就行了,第四个参数是数据的有效期,就是说数据在这个时间内是有效的,如果过 去这个时间,那么会被Memcache服务器端清除掉这个数据,单位是秒,如果设置为0,则是永远有效,我们这里设置了60,就是一分钟有效时间:
$mem->set(‘key1‘, ‘This is first value’, 0, 60);

从Memcache服务器端获取一条数据,它只有一个参数,就是需要获取数据的key,我们这里是上一步设置的key1,现在获取这个数据后输出输出:
$val = $mem->get(’key1′);
echo "Get key1 value: " . $val;

现在是使用replace方法来替换掉上面key1的值,replace方法的参数跟set是一样的,不过第一个参数key1是必须是要替换数据内容的key,最后输出了:
$mem->replace(‘key1′, ‘This is replace value’, 0, 60);
$val = $mem->get(‘key1′);
echo "Get key1 value: " . $val;

同样的,Memcache也是可以保存数组的,下面是在Memcache上面保存了一个数组,然后获取回来并输出
$arr = array(‘aaa’,‘bbb’,‘ccc’, ‘ddd’);
$mem->set(‘key2′, $arr, 0, 60);
$val2 = $mem->get(‘key2′);
print_r($val2);

现在删除一个数据,使用delte接口,参数就是一个key,然后就能够把Memcache服务器这个key的数据删除,最后输出的时候没有结果
$mem->delete(‘key1′);
$val = $mem->get(‘key1′);
echo "Get key1 value: " . $val . "<br>";

最后我们把所有的保存在Memcache服务器上的数据都清除,会发现数据都没有了,最后输出key2的数据为空,最后关闭连接
$mem->flush();
$val2 = $mem->get(‘key2′);
echo "Get key2 value: ";
print_r($val2);
echo "<br>";

2012-1-30 18:21 Monday  

一、源码包准备

服务器端主要是安装memcache服务器端,目前的最新版本是 memcached-v1.4.4 。
下载:http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
另外,Memcache用到了libevent这个库用于Socket的处理,所以还需要安装libevent,

libevent的最新版本是libevent-1.4.13-stable。(如果你的系统已经安装了libevent,可以不用安装)
官网:http://www.monkey.org/~provos/libevent/
下载:http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz

准备Memcached的PHP扩展的源码安装包:
官网:http://pecl.php.net/get/memcache-2.2.5.tgz

Linux指令下载:

wget http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
wget http://pecl.php.net/get/memcache-2.2.5.tgz

二、安装与配置

1、先安装libevent

tar zxvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure –prefix=/usr
make
make install

2、测试libevent是否安装成功

ls -al /usr/lib | grep libevent
libevent-1.1a.so.1
libevent-1.1a.so.1.0.2
libevent-1.4.so.2
libevent-1.4.so.2.1.3
libevent.a
libevent_core-1.4.so.2
libevent_core-1.4.so.2.1.3
libevent_core.a
libevent_core.la
libevent_core.so
libevent_extra-1.4.so.2
libevent_extra-1.4.so.2.1.3
libevent_extra.a
libevent_extra.la
libevent_extra.so
libevent.la
libevent.so

版本不同,可能文件列表不同。

3、安装memcached,同时需要安装中指定libevent的安装位置

tar zxvf memcached-1.4.4.tar.gz
cd memcached-1.4.4
./configure –with-libevent=/usr
make && make install

安装完成后会把memcached 自动放到 /usr/local/bin/memcached

4、测试是否成功安装memcached

ls -al /usr/local/bin/mem*
-rwxr-xr-x 1 root root 201869 12-14 21:44 /usr/local/bin/memcached

5、安装Memcache的PHP扩展

①安装PHP的memcache扩展

tar vxzf memcache-2.2.5.tgz
cd memcache-2.2.5
/usr/local/webserver/php/bin/phpize
./configure –enable-memcache –with-php-config=/usr/local/webserver/php/bin/php-config –with-zlib-dir
make
make install

②上述安装完后会有类似这样的提示:

Installing shared extensions: /usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613/

③把php.ini中的extension_dir = “./”修改为

extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/”

④添加一行来载入memcache扩展:extension=memcache.so

三、memcached的基本设置

1.启动Memcache的服务器端:

memcached -d -m 10 -u root -l 202.207.177.177 -p 11211 -c 256 -P /tmp/memcached.pid

参数说明:

-d选项是启动一个守护进程,
-m是分配给Memcache使用的内存数量,单位是MB,我这里是10MB,
-u是运行Memcache的用户,我这里是root,
-l是监听的服务器IP地址,如果有多个地址的话,我这里指定了服务器的IP地址202.207.177.177,
-p是设置Memcache监听的端口,我这里设置了11211,最好是1024以上的端口,
-c选项是最大运行的并发连接数,默认是1024,我这里设置了256,按照你服务器的负载量来设定,
-P是设置保存Memcache的pid文件,我这里是保存在 /tmp/memcached.pid,

2.如果要结束Memcache进程,执行:

kill `cat /tmp/memcached.pid`

也可以启动多个守护进程,不过端口不能重复。

3.检查Memcached是否启动

netstat -ant
tcp        0      0 202.207.177.177:11211       0.0.0.0:*                   LIST

11211端口已经打开,说明Memcached已正常启动。

4.重启CentOS

reboot

四、Memcache环境测试

运行下面的php文件,如果有输出This is a test!,就表示环境搭建成功。开始你的Memcache的征途吧!

1
2
3
4
5
6
7
8
9
<?php
 
$mem= newMemcache;
$mem->connect("202.207.177.177", 11211);
$mem->set('key', 'This is a test!', 0, 60);
$val= $mem->get('key');
echo$val;
 
?>


五、参考资料

对Memcached有疑问的朋友可以参考下列文章:
Linux下的Memcache安装:http://www.ccvita.com/257.html
Nginx 0.8.x + PHP 5.2.10(FastCGI)搭建胜过Apache十倍的Web服务器: http://blog.s135.com/nginx_php_v5/

转 http://blog.lixiphp.com/centos-linux-memcache-nginx-php-install/

 

 

 

------------------------------------------------------------------------------------

直接能通过YUM安装MEMCACHE

1、安装 EPEL Repo

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm


2、安装 Memcache
yum -y install memcached


安装过程中可能会出现如下问题:
--> Missing Dependency: perl(Net::SSLeay) >= 1.33 is needed by package perl-AnyEvent-5.240-1.el5.rf.noarch (rpmforge)
Error: Missing Dependency: perl(Net::SSLeay) >= 1.33 is needed by package perl-AnyEvent-5.240-1.el5.rf.noarch (rpmforge)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

这个问题是因为CentOS的 yum没有memcached需要的最新的 perl-Net-SSLeay 和 perl-IO-Socket-SSL包.
解决办法也很简单,删除旧的包,安装新的包。

查看旧版本的包
rpm -qa | grep perl-Net-SSLeay
rpm -qa | grep perl-IO-Socket-SSL

移除并安装新包
rpm-e perl-Net-SSLeay-1.30-4.fc6
rpm -e perl-IO-Socket-SSL-1.01-1.fc6
wget
http://packages.sw.be/perl-Net-SSLeay/perl-Net-SSLeay-1.36-1.el5.rfx.i386.rpm
wget http://packages.sw.be/perl-Net-SSLeay/perl-Net-SSLeay-1.36-1.el5.rfx.x86_64.rpm
wget http://packages.sw.be/perl-IO-Socket-SSL/perl-IO-Socket-SSL-1.34-1.el5.rfx.noarch.rpm
rpm -i perl-Net-SSLeay-1.36-1.el5.rfx.x86_64.rpm
rpm -i perl-Net-SSLeay-1.36-1.el5.rfx.i386.rpm
rpm -i perl-IO-Socket-SSL-1.34-1.el5.rfx.noarch.rpm

然后再执行安装命令
yum -y install memcached

即可安装成功

3、设置为开机启动
chkconfig --level 2345 memcached on


4、启动和停止
/etc/init.d/memcached start|stop

 

 

客户端,直接将 php_memcache.so放到php的module中,然后在php.ini中载入即可

 

为安全起见,最好是修改一下memcache的端口,不要保留为默认的11211

可以用下面的方式改

memcached -d -m 10 -u root -l 202.207.177.177 -p 11211 -c 256 -P /tmp/memcached.pid

也可以

vi /etc/sysconfig/memcached 修改那里的端口即可
<?php
/**
 * PHP操作mssql数据库类,含分页类
 * Enter description here ...
 * @author aboc 9986584 2011-04-09
 *
 */
class DB_Handle{
var $ClassName = "DB_Handle";

var $Server;
var $UserName;
var $Password;
var $Database;

var $LinkID=0;
var $QueryResult="";
var $LastInsertID = "";

//* private ignore=>ignore the error and continue, halt=>report the error and halt, report=>report the error and continue
var $Halt_On_Error = "report";

var $Error = "";
var $ErrNo = 0;

var $total = 0;
var $page = 0;
var $page_num = 10;
var $page_size = 10;
var $page_name = 'page';

//* remark: This is the db_mysql_class's structure     * function: Set the server,username,password,database variable.
function DB_Handle($server="",$username="",$password="",$database=""){
    $this->Server = $server;
    $this->UserName = $username;
    $this->Password = $password;
    $this->Database = $database;    
}

    //* function: Connect database and select database    * success: retun 1    * failed: return 0
function connect(){
    $this->LinkID = @mssql_pconnect($this->Server,$this->UserName,$this->Password);
    if(!$this->LinkID){
    $this->halt("mssql_pconnect($this->Server,$this->UserName,$this->Password): Failed");
    return 0;
    }
    if(!@mssql_select_db($this->Database)){
    $this->halt("mssql_select_db($this->Database) Failed.");
    return 0;
    }
    return 1;
}
//* function: Check the database, if exist then select        * exist: return 1        * not exist: return 0
function selectDatabase(){
    if(@mssql_select_db($this->Database))
    return 1;
    else
    return 0;
}
//* function: Execute SQL instruction    * success: return SQL Result.    * failed: return 0;
function execQuery($sql=""){
    if($this->LinkID == 0){
    $this->halt("Execute SQL Failed: Hava not valid database connect.");
    return 0;
    }
    ob_start();
    $this->QueryResult = mssql_query($sql,$this->LinkID);
    $error = ob_get_contents();
    ob_end_clean();
    if($error){
    $this->halt("Execute SQL: mssql_query($sql,$this->LinkID) failed.");
    return 0;
    }
    $reg = "#insert into#";
    if(preg_match($reg,$sql)){
    $sql = "select @@IDENTITY as id";
    $res = mssql_query($sql,$this->LinkID);
    $this->LastInsertID = mssql_result($res,0,id);
    }
    return $this->QueryResult;
}
//* function: Get the query result's row number//* success: return the row fo the Result//* failed: return 0
function getTotalRowNum($result=""){
    if($result != "") $this->QueryResult = $result;
    $row = @mssql_num_rows($this->QueryResult);
    if($row >= 0) return $row;
    $this->halt("Get a row of result Failed: Result $result is invalid.");
    return 0;
}
//* function: Get the last insert record's id    //* success: return id        //* failed: return 0
function lastInsertID(){
    return $this->LastInsertID;
}
//* function: Get a field's value    * success: return value of the field        * failed: return 0
function getField($result="",$row=0,$field=0){
    if($result != "") $this->QueryResult = $result;
    $fieldvalue = @mssql_result($this->QueryResult,$row,$field);
    if($fieldvalue != "") return $fieldvalue;
    $this->halt("Get field: mssql_result($this->QueryResult,$row,$field) failed.");
    return 0;
   //Here should have error handle
}
//* function: Get next record    * success: return a array of the record's value            * failed: return 0
function nextRecord($result=""){
    if($result != "") $this->QueryResult = $result;
    $record = @mssql_fetch_array($this->QueryResult);
    if(is_array($record)){
        foreach ($record as $key=>$row)
        $record[$key] = trim($row);
        return $record;
    }
    //$this->halt("Get the next record Failed: the Result $result is invalid.");
    return 0;
}
//* function: Free the Query Result    * success return 1   * failed: return 0
function freeResult($result=""){
    if($result != "") $this->QueryResult = $result;
    return @mssql_free_result($this->QueryResult);
}
//* function: Set the Halt_On_Error's state     * success: return 1    * failed: return 0
function setHaltOnError($state="ignore"){
    if(!($state == "ignore" || $state == "report" || $state == "halt")){
    $this->halt("Set the Halt_On_Error Fail: There is no state value $state");
    return 0;       
    }
    $this->Halt_On_Error = $state;
    return 1;
}
//* function: Get the Halt_On_Error's state
function getHaltOnError(){
    return $this->Halt_On_Error;
}
//* function: Get the class's name
function toString(){
    return $this->ClassName;
}
//* function: Error handle
function halt($msg){
    $this->Error = @mysql_error($this->LinkID);
    $this->ErrNo = @mysql_errno($this->LinkID);
    if ($this->Halt_On_Error == "ignore") return;
    $this->makeMsg($msg);
    if ($this->Halt_On_Error == "halt") die("Session halted");
}

//* function: Make error information and print
function makeMsg($msg){
    printf("Database error: %s
\n", $msg);
    printf("MySQL Error: %s (%s)
\n",$this->ErrNo,$this->Error);
}
/**
 * 以下为分页类
 */

    private function getQuery(){
        $query = '';
        if( isset($_GET) && is_array($_GET)){
            foreach ($_GET as $key=>$value){
                if ($key == 'page')continue;
                $query .= !empty($query)?'&'.$key.'='.$value:$key.'='.$value;
            }
        }
        $query .= empty($query)?'':'&';
        return $this->getFilename().$query;
    }
    
    /**
     * 获取当前的url文件名并带上?
     */
    private function getFilename() {
        //$filename = str_replace($_SERVER['QUERY_STRING'],'',basename($_SERVER["REQUEST_URI"]));
        $filename = str_replace('?'.$_SERVER['QUERY_STRING'],'',basename($_SERVER["REQUEST_URI"])).'?';
        return $filename;
    }
    
    /**
     * 返回带分页名的连接字符
     */
    private function returnPageLink( $page ){
        return $this->getQuery().$this->page_name.'='.$page;
    }

    /**
     * 下一页链接
     */
    function nextPageLink(){
        if( $this->page != $this->page_num )
        return $this->returnPageLink($this->page+1);
        else
        return '#';
    }    

   function getListData($sql,$num=10){
       $this->execQuery($sql);
       $this->page_num = $this->getTotalRowNum();
       if (!$this->page_num || !$num )return array();
       $this->page_size = $num;
       $this->page = isset($_GET[$this->page_name])?intval($_GET[$this->page_name]):1;
       $pageTotal = ceil($this->page_num/$num);
       if ($this->page < 0)$this->page = 0;
       if ($this->page > $pageTotal) $this->page = $pageTotal;
       $list = array();
       if (mssql_data_seek($this->QueryResult, ($this->page-1)*$this->page_size)){
           for ($i=0;$i<$num;$i++){
               $list[] = $this->nextRecord();
           }           
       }
       return $list;
   }


    /**
     * 输出中文分页链接 上一页,下一页
     *
     * @return unknown
     */
    function pagelist( $total='总共',$dataname='条',$now='当前',$page='页',$first='第一页',$last='尾页',$prev='上一页',$next='下一页' ){
        $total='<span>'.$total.$this->page_size.$dataname.' '.$now.($this->page).'/'.($this->page_num).$page.'</span>';
        $startpage='<a href="'.$this->returnPageLink(1).'">'.$first.'</a>';
        $endpage='<a href="'.$this->returnPageLink($this->page_num).'">'.$last.'</a>';
        if($this->page == 1){
            $prepage='<span>'.$prev.'</span>';
        }else{
            $prepage='<a href="'.$this->returnPageLink($this->page-1).'">'.$prev.'</a>';
        }
        if($this->page==$this->page_num){
            $nextpage='<span>'.$next.'</span>';
        }else{
            $nextpage='<a href="'.$this->returnPageLink($this->page+1).'">'.$next.'</a>';
        }
        if($this->page_size == 0)return '';
        return $total.' '.$startpage.' '.$prepage.' '.$nextpage.' '.$endpage;
    }
    
    /**
     * 输出下拉框的列表
     *
     */
    function select() {
        $select = '<select name="pageselect" id="pageselect"  onchange="window.location=\''.$this->getQuery().$this->page_name.'=\'+pageselect.value">';
        $totalnum = $this->page_num;
        for($i=1;$i<=$totalnum;$i++) {
            if($this->page == $i){
                $str = ' selected="selected"';
            } else {
                $str = '';
            }
            $select .= '<option value="'.$i.'"'.$str.'>'.$i.'</option>';
        }
        $select .= '</select>';
        if($this->page_size == 0)$select = '';
        return $select;        
    }

    /**
     * 输入页数到多少页
     *
     */
    function gotoPage($buttonname='到'){
        $string = '<input type="text" size="3" name="dm_pagenum"><input type="button" value="'.$buttonname.'" onclick="window.location=\''.$this->getQuery().$this->page_name.'=\'+dm_pagenum.value"> ';
        if($this->page_size == 0)$string = '';
        return $string;
    }
    
    function pageListBaidu($first='首页',$pre_page='上一页',$next_page='下一页',$last='尾页' ,$shownum=6) {
        if($this->page_num == 1) return;
        $pagelink = '';
        if($this->page != 1) {
            $pagelink .= '[<a href="'.$this->returnPageLink(1).'">'.$first.'</a>]&nbsp;';
            $pagelink .= '[<a href="'.$this->returnPageLink($this->page-1).'">'.$pre_page.'</a>]&nbsp;';
        }
        for ($i=$shownum;$i>=1;$i--) {
            $tmp_page = $this->page - $i;
            if( $tmp_page >= 1 ) {
                $pagelink .= '[<a href="'.$this->returnPageLink($tmp_page).'">'.$tmp_page.'</a>]&nbsp;';
            }
        }
        $pagelink .= '<span>'.$this->page.'</span>';
        for ($i=1;$i<=$shownum;$i++) {
            $tmp_page = $this->page + $i;
            if( $tmp_page <= $this->page_num ) {
                $pagelink .= '[<a href="'.$this->returnPageLink($tmp_page).'">'.$tmp_page.'</a>]&nbsp;';
            }
        }        
        
        if( $this->page != $this->page_num ){
            $pagelink .= '[<a href="'.$this->returnPageLink($this->page+1).'">'.$next_page.'</a>]&nbsp;';
            $pagelink .= '[<a href="'.$this->returnPageLink($this->page_num).'">'.$last.'</a>]';
        }
        if($this->num == 0)$pagelink = '';
        return $pagelink;   
    }


}

2012-1-30 18:20 Monday  
<link rel="icon" href="animated_favicon1.gif" type="image/gif" >

一,getimagesize不知道为什么在本地会很慢,注释掉就可以了

二,关于这个用网上说的方法吧

php环境兼容性问题--
内容编码错误
无法显示您尝试查看的页面,因为它使用了无效或者不支持的压缩格式。
请联系网站的所有者以告知此问题。

以前也遇到过同样的问题,记得是PHP代码ob_start('ob_gzhandler')导致的,导致的原因有两种,

1. 服务器不支持这种压缩格式,可使用function_exists('ob_gzhandler')判断,解决方法 ob_start('ob_gzhandler')改为ob_start();
2. 使用ob_start('ob_gzhandler')时候前面已经有内容输出,检查前面内容以及require include调用文件的内容。若无法找到可以在调用其它文件前使用ob_start(),调用之后使用 ob_end_clean () 来清除输出的内容;

在 调用ob_start();前加入 ob_end_clean () 

   还有一点需要注意的是,PHP5.30版本,默认不再支持<?=$username;?>这样的语法,输出变量需使用& lt;?php echo $username;?>语法才可以。你可以通过将 php.ini 中的 short_open_tag 设置为 On,这样就可以兼容原来的语法。

在对ubuntu系统进行相关设置后,就可以进行各种环境的搭建,这里介绍apache+mysql+php环境的搭建:
1、安装Mysql
aptitude install mysql-server mysql-client  安装过程中,要输入MySQL的root用户密码,
New password for the MySQL "root" user: <-- yourrootsqlpassword
Repeat password for the MySQL "root" user: <-- yourrootsqlpassword
数据文件放在: /var/lib/mysql下
2、安装Apache
代码:aptitude install apache2
安装完后,在浏览器中访问 http://192.168.0.100 看到如下图所示的页面,就说话安装成功了:
Ubuntu系统中Apache的默认文档根目录为 /var/www,配置文件位于/etc/apache2/apache2.conf。其他的一些额外配置文件存放在/etc/apache2的子目录 里,如 /etc/apache2/mods-enabled (Apache模块配置文件),/etc/apache2/sites-enabled (虚拟主机配置文件),还有 /etc/apache2/conf.d
3、安装Php5
aptitude install php5 libapache2-mod-php5
安装完成后,重新启动apache2服务:
代码: /etc/init.d/apache2 restart
由于默认Web站点的根目录位于 /var/www,我们就在该根目录新建一名为 info.php 的php程序文件,并从浏览器里访问它,以测试PHP5是否成功安装。该测试php文件中使用 phpinfo() 函数获得服务器中安装的PHP软件包详情,比如PHP的版本、所支持的组件等等。
代码: vi /var/www/info.php
<?php  phpinfo();  ?>
文件编辑好后,保存退出,在浏览器里浏览该文件(文中使用http://192.168.0.100/info.php
4、为PHP5安装MySQL支持
为了让PHP支持MySQL,我们必须安装php5-mysql软件包。同时,还可以为php安装一些可选的支持模块,如mcrypt, memcache, gd, pear, imagick等等。使用下面的命令可以搜索一下php5相关的模块:
aptitude search php5
选择你想安装的模块,并安装它们,本文列出了一些常用的php5软件包并安装,执行下面的命令: 
aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
安装完成后,重启apache2服务: /etc/init.d/apache2 restart
这时候,刷新浏览器或者重新打开 http://192.168.0.100/info.php 就可以看到刚刚安装的php功能了,注意看看mysql和mysqli相关的信息
这样就完成了搭建。。。

by Aboc  

如果没有aptitude 则可以用apt-get

mod_rewrite是Apache的一个非常强大的功能,它可以实现伪静态页面。下面我详细说说它的使用方法!对初学者很有用的哦!
1.检测Apache是否支持mod_rewrite
         通过php提供的phpinfo()函数查看环境配置,通过Ctrl+F查找到“Loaded Modules”,其中列出了所有apache2handler已经开启的模块,如果里面包括“mod_rewrite”,则已经支持,不再需要继续设 置。如果没有开启“mod_rewrite”,则打开目录 您的apache安装目录“/apache/conf/” 下的 httpd.conf 文件,通过Ctrl+F查找到“LoadModule rewrite_module”,将前面的”#”号删除即可。如果没有查找到,则到“LoadModule” 区域,在最后一行加入“LoadModule rewrite_module modules/mod_rewrite.so”(必选独占一行),然后重启apache服务器即可。
        
2.让apache服务器支持.htaccess
     如何让自己的本地APACHE服务器支持”.htaccess”呢?其实只要简单修改一下apache的httpd.conf设置就可以让APACHE支 持.htaccess了。打开httpd.conf文件(在那里? APACHE目录的CONF目录里面),用文本编辑器打开后,查找
<Directory />
     Options FollowSymLinks
     AllowOverride None
</Directory>
改为
<Directory />
     Options FollowSymLinks
     AllowOverride All
</Directory>
就可以了。

# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]

1.netstat -lnp|grep 80

tcp        0      0 192.168.180.68:61027        0.0.0.0:*                   LISTEN      6289/oproxyd       
tcp        0      0 :::80                       :::*                        LISTEN      846/httpd           
tcp        0      0 ::ffff:192.168.180.68:7001 :::*                        LISTEN      32015/java         

找到pid 846

#ps 846

查看
#kill -9 846

杀掉

#./apachectl start

启动成功

*****************************************************************************
处理办法:
# ps -aux | grep http
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root     12079 0.0 0.0 61164   720 pts/1    S+   16:06   0:00 grep http
# ps -aux | grep apache
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
apache   10820 0.0 0.0   2044   600 ?        Ss   Jan01   0:04 bash
root     12081 0.0 0.0 61160   716 pts/1    S+   16:06   0:00 grep apache
# kill -9 10820
# /etc/init.d/httpd start
Starting httpd:                                            [ OK ]
# /etc/init.d/httpd restart
Stopping httpd:                                            [ OK ]
Starting httpd:                                            [ OK ]
**********************************************************

2012-1-30 18:17 Monday  

如果默认编码是gb2312的话,会出现乱码.经百度告知原来是http.conf强制使用了utf-8,我们只要把它改为关闭就可以了

  AddDefaultCharset UTF-8 改为 AddDefaultCharset OFF

另外:有另外一种方法,但是我感觉好像没有奏效:http://hi.baidu.com/qrpeng/blog/item/e76164085e2b9e9e0a7b82fd.html

以下是引用他的

修改http.conf中的AddDefaultCharset为AddDefaultCharset off,关闭apache默认编码,这样php的应用和tomcat下的应用都分别采用各自的编码,apache不会强行修改这些应用返回的 response的http头中的charset。如此一来就ok了。

 

json的install。

Google到一些文档都是下载后进行编译的,显得比较费事。还好有大牛写出了比较简单的方法,我转载一下

yum update "*php*"

pecl install json

cd /etc/php.d/

echo “extension=json.so” >> json.ini

service httpd restart

Github
PHP技术交流群
PHP技术交流群:109943929
Discuz!插件制作/站长交流群
Discuz!插件制作/站长交流群
日历
百度联盟
搜索