摘要:
参考老外的:Make a copy your initial openssl.cnf file (the original is probably somewhere under /etc on Linux).Edit it to add req_extensions = v3_req in the [ req ] section.Edit it to add subjectAltName=DNS:www.example.com,DNS:www.other-example.com (one DNS: entry per host name you require) in the [ v3_re 阅读全文
摘要:
function socketopen($host, $query){ $fp = fsockopen( $host, 80); if(!$fp) return false; $d = $c = ''; if(!empty($_POST)){ $way='POST'; $c = http_build_query($_POST); $l = strlen($c) ; $d .= "Content-Type: application/x-www-form-urlencoded\r\n"; $d .= "Content-Length: $ 阅读全文
摘要:
//以下gcc能编译过,且正确,vc++下可能错误char* jstringtochar( JNIEnv *env, jstring jstr ){char* rtn = NULL;jclass clsstring = (*env)->FindClass(env,"java/lang/String");jstring strencode = (*env)->NewStringUTF(env,"utf-8");jmethodID mid = (*env)->GetMethodID(env,clsstring, "getBytes 阅读全文
摘要:
1.fsockopen方式,可post图片://例子:socket_post('http://site.com/', array('key1'=>'value1', 'key2'=>'value2'), array('filekey'=>'filepath')) function socket_post($url, $postdata=array(), $files=array()) { $boundary = '-------'.substr(md 阅读全文
摘要:
首先安装# yum -y install vsftpd分配用户及其目录# /usr/sbin/adduser -d /var/www -g ftp -s /sbin/nologin ftpname(删除用户 # userdel 用户名)为用户设置密码# passwd ftpname按提示输入两次密码设置目录权限# chmod 777 /var/www基本上就可以了,若无法登录:设置目录的属主# chown ftpname /var/www禁止匿名访问:修改配置# vi /etc/vsftpd/vsftpd.conf进入编辑器按“i”进入编辑模式,修改(期间不要使用小键盘):anonymous_ 阅读全文
摘要:
1.跳转目录:cd 目录名如:cd /usr/local 即跳转到usr下的local目录中2.显示当前目录下的目录 dudu --max-depth=1 -h查看当前文件夹大小:du -s 3.编辑文件 vi 路径vi /usr/local/nginx/conf/nginx.conf编辑完按Esc,再按:保存或不保存退出4.压缩解压 tar解压:tar zxvf FileName.tar.gz压缩:tar zcvf FileName.tar.gz DirName5.安装yum安装:yum -y install httpd卸载:yum -y remove httpd6.查找findfind . 阅读全文
摘要:
查询文章表table,取出所有文章,置顶ID为1、5、12、2的文章,并按上述顺序显示。SELECT * FROM `table`ORDER BY FIELD(`zj`,1,5,12,2) DESC,`time` DESC 阅读全文