`
lxj8749
  • 浏览: 64454 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
如果希望php访问一下网址,但不需要返回结果,如:需要执行很长时间的页面,不用等待返回结果,只需要执行了就可以了 curl_setopt($ch, CURLOPT_TIMEOUT, 1);把这个设置成1秒后超时就可以了   $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/test2.php"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); cur ...

php 正则表达式

    博客分类:
  • php
$content = str_replace(["\r\n", "\n", "\r"],'',$content); preg_match_all('|<h1>(.*)漫画</a></h1>|U',$content,$out);

linux 常用命令

文件移动和改名 mv abc.tar 123.tar ./php-fpm 直接启动php-fpm killall php-fmp 关闭php-fpm进程 查看进程:  ps -e |grep ssh whereis nginx 查看nginx安装位置 /usr/sbin/nginx -s reload 重启  location ~ \.php($|/) { phpinfo    
按照默认步骤安装系统   1.需正常安装了vmware Tools,才能显示图形界面,否则进入后只有命令行 (ctrl+alt+T打开命令行) 2.打开编辑->虚拟网络编辑器,把vmnet0改为桥接模式,其它的网络可以删除 3.进入虚拟机里,安装openssh-server,命令:sudo apt-get install openssh-server (安装完运行ssh localhost,不确定是否必须运行) 4.虚拟机运行 ifconfig查看虚拟机ip 5.直接连接虚拟机的ip,输入管理员帐号密码可连接上     安装php环境 wget -c http ...
3、异步GET请求 //第一步,创建url NSURL *url = [NSURL URLWithString:@"http://api.hudong.com/iphonexml.do?type=focus-c"]; //第二步,创建请求 NSURLRequest *request = [[NSURLRequest alloc]initWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10]; //第三步 ...

nginx url重写

    location / {        root   /web;        index  index.html index.htm index.php;        rewrite  ^(.*).html$ index.php/$1  last;        break;    }
创建 create user 'test1'@'localhost/127.0.0.1' identified by '123' 本机权限 create user 'test1'@'%' identified by '123' 所有权限 删除 drop user 'user'@'host' 撤销用户权限 revoke all on *.* from 'test'@'localhost'; 更改用户名 rename user 'test'@'localhost' to 'test1'@'%'; 增加权限 GRANT ALL PRIVILEGES ON app. ...
先在linux端安装小型的浏览器:lynx yum install lynx   编辑cron任务 crontab -e 在里面加入 30 20 * * *  lynx -dump http://XXX/a.php 这样服务器每天晚上8:30就会访问该地址, 需要定时处理的操作就放到这个a.php里,到时间就是执行。
<script type="text/javascript"> //滚动信息 window.onload=function(){marquee('roll_box','roll_content','roll_temp','40'); } function marquee(id,id1,id2,speed){ var obj=document.getElementById(id); var obj1=document.getElementById(id1); var obj2=document.getElementById(id2); ...

js面向对象

//建立唯一类对象的方法://Person是一个匿名类的唯一实例化 对象, 故它不是一个类, 不能够再用new 来示例化!!var Person={                                      //注意: 没有 propertype 属性,name:'person',getName:function(){return 'person';}};//建立类//方法一:    常规var One = function(){ this.name = 'One person';                       //非静态属性/*在类里访问属性或方法比须用this* ...
在activity中获取屏幕的尺寸         DisplayMetrics  dm = new DisplayMetrics();          //取得窗口属性          getWindowManager().getDefaultDisplay().getMetrics(dm);          //窗口的宽度          int screenWidth = dm.widthPixels;          //窗口高度          int screenHeight = dm.heightPixels;         Lo ...
$(window).height();  //浏览器时下窗口可视区域高度 $(document).height();  //浏览器时下窗口文档的高度 $(document.body).height(); //浏览器时下窗口文档body的高度 $(document.body).outerHeight(true); //浏览器时下窗口文档body的总高度 包括border padding margin $(window).width();  //浏览器时下窗口可视区域宽度 $(document).width(); //浏览器时下窗口文档对于象宽度 $(document.body).width(); ...
新增加文件/etc/udev/rules.d/51-Android.rules 内容如下:(这个是htc手机配置内容,其它手机内容可以通过lsusb命名来查看) SUBSYSTEM=="usb", SYSFS{"High Tech Computer Corp."}=="0bb4", MODE="0666" 再把/etc/udev/rules.d/51-Android.rules文件权限改成777   执行 /etc/init.d/udev-post reload   再进入android的sdk目录, ...
新建一个android项目 再添加一个class,如MyView,继承View或其它view,如TextView   package cn.zymk.test; import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; public class MyView extends TextView { public MyView(Context context, AttributeSet attrs) { super(contex ...
http://subclipse.tigris.org/update_1.8.x 选择help > install new software 输入地址按回车,勾选后安装
Global site tag (gtag.js) - Google Analytics