摘要: JSON_RPC_Client 客户端/** * @package JSON_RPC 客户端请求 * @author fengwei * */class jsonRPCClient { /** * @desc Debug state * @var boolean */ static private $debug = false; /** * @desc 应用通信的key * @var string */ static private $key = "1.0_7413a20f00d1a1790d387822097ddae2"; /** * @desc 请求服务器的地址 * @ 阅读全文
posted @ 2012-07-21 13:24 投河自尽的鱼 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: 看到下面这段代码能知道他的输出吗<script type="text/javascript">function C (){ this.x = 10; this.y = 10;}C.prototype.pi = 3.14;C.prototype.area = function(){ alert(this.x * this.y * this.pi);}var B = new C();B.pi = 314;alert(B.pi);alert(C.prototype.pi);</script>没错 第一次输出 是 314,第二次是 3.14通过B.pi = 阅读全文
posted @ 2012-07-14 13:41 投河自尽的鱼 阅读(952) 评论(4) 推荐(0) 编辑
摘要: 在网页里有一个文本框,当用户在该文本框内输入一个四位的数字后,试用JS脚本判断这个数字对应的年份是什么生肖?(例如:输入2008,生肖为鼠;十二生肖的顺序是:鼠牛虎兔龙蛇马羊猴鸡狗猪)并且在该文本框旁边输入这个生肖结果。要求写出本题涉及到的HTML及JS代码(15分)php 版代码1 function getAnimal($num)2 {3 $animals = array('鼠','牛'虎','兔','龙','蛇','马','羊','猴','鸡 阅读全文
posted @ 2012-07-12 13:43 投河自尽的鱼 阅读(622) 评论(0) 推荐(0) 编辑
摘要: CentOS下使用yum 安装mysql在启动的时候会报这个错误Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’yum安装mysql这个包其实是MySQL 客户端程序和共享库,所以我们还需要安装php-mysql和mysql-server这两个包.[root@localhost~]yuminstallmysqlmysql-serverphp-mysql-y[root@localhost~]chkconfigmysqldon[root@localhost~]servicemysqldsta 阅读全文
posted @ 2012-06-23 23:10 投河自尽的鱼 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 如何异步上传文件呢?通过 form 的target 属于,把from提交到iframe里面去好了,我们来实现一下HTML页面<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript" src="jquery.js"></script><script>alert("只出现一次 阅读全文
posted @ 2012-06-22 11:00 投河自尽的鱼 阅读(1636) 评论(4) 推荐(0) 编辑
摘要: 测试环境 window apache2.2.11命令 ab-n 请求的总数-c 并发的总数//一百个请求 10个并发D:\wamp\bin\apache\Apache2.2.11\bin>ab -n 100 -c 10http://www.baidu.com/index.php测试一下百度的信息命令 ab http://www.baidu.com/index.phpD:\wamp\bin\apache\Apache2.2.11\bin>ab http://www.baidu.com/index.phpThis is ApacheBench, Version 2.3 <$Rev 阅读全文
posted @ 2012-06-19 22:32 投河自尽的鱼 阅读(2128) 评论(0) 推荐(0) 编辑