03 2012 档案

摘要:通过$_GET方式将要显示的页码变量传递过来,网页根据该变量读取相关数据显示出来。截图如下:代码如下:<html><title>分页模块</title><style type="text/css"> body{ text-align:center; }</style><body><div id="all"><?php $current_page = 1; if(!empty($_GET['page'])){ $current_page = $_GET 阅读全文
posted @ 2012-03-29 11:32 icamel 阅读(260) 评论(0) 推荐(0) 编辑
摘要:此通信录模块主要功能:1.向mysql数据库中插入通讯录;2.从数据库中读取通讯录并显示。截图如下:代码如下:<body bgcolor="#99CCFF" text-align="center"><form action="index.php" method="post" name="Form"> <table> <tr> <td align="right">姓名:</td> <td>< 阅读全文
posted @ 2012-03-29 09:53 icamel 阅读(222) 评论(0) 推荐(0) 编辑
摘要:编程开发工具 1.http://www.ghisler.com/(total commander 简称TC windows资源管理器终结者) 2.http://www.netsarang.com/products/xsh_overview.html(xshell win系统链接linnux) 3.http://www.smarty.net/(smarty 模板)编辑器: 1.http://www.sublimetext.com/(sublimetext 官网,一个不错的编辑器) 2.http://www.ultraedit.cn/(ultraedit 官网) 3.http://www... 阅读全文
posted @ 2012-03-28 14:47 icamel 阅读(310) 评论(0) 推荐(0) 编辑
摘要:1.dreamweaver 非专业编辑器,初学者2.zend development environment3. php designer (php程序和WEB开发的最好编辑器和PHP IDE。快速,省时,强大。稳定)4. komodo IDE 5.0 阅读全文
posted @ 2012-03-28 14:41 icamel 阅读(164) 评论(0) 推荐(0) 编辑
摘要:第一步:下载安装文件 1. MySQL:进入http://www.mysql.com/downloads/mysql/下载地址mysql-5.5.22-win32.msi 2. Apache: 进入http://httpd.apache.org/download下载httpd-2.2.22-win32-x86-no_ssl.msi 3. PHP5.4.0 进入http://windows.php.net/download/下载php-5.4.0-Win32-VC9-x86.zip(VC9 x86 Thread Safe) 注:不要下载php-5.4.0-nts-Win32-VC9-x... 阅读全文
posted @ 2012-03-28 14:09 icamel 阅读(463) 评论(0) 推荐(0) 编辑
摘要:故障现象: 在命令符方式下启动Apache时提示错误信息“Syntax error on line 122 of D:/Apache/conf/httpd.conf: Cannot load D:/PHP/php5apache2_2.dll into server”,导致Apache无法启动。 Apache的配置文件D:/Apache/conf/httpd.conf第122行内容为: LoadModule php5_module D:/php/php5apache2_2.dll PHPIniDir "D:/php" 注意:其中D:/PHP/php5apache2_2.dll 阅读全文
posted @ 2012-03-28 11:34 icamel 阅读(3095) 评论(1) 推荐(0) 编辑
摘要:第一步:下载安装文件 1. MySQL:进入http://www.mysql.com/downloads/mysql/下载地址mysql-5.5.22.zip或mysql-5.5.22-win32.msi(最新版5.5.22); 2. Apache: 进入http://httpd.apache.org/download下载httpd-2.2.22-win32-x86-no_ssl.msi(最新版的2.4.1但还不可下载) 3. PHP5.4.0 进入http://windows.php.net/download/下载php-5.4.0-Win32-VC9-x86.zip(VC9 x86 Th. 阅读全文
posted @ 2012-03-27 19:49 icamel 阅读(1240) 评论(0) 推荐(0) 编辑
摘要:服务器端代码:from socket import *from time import ctimeHOST = ''PORT = 1234ADDR = (HOST, PORT)BUFSIZE = 1024def main(): udpSer = socket(AF_INET, SOCK_DGRAM) udpSer.bind(ADDR) while True: print('waiting for message...') data, adr = udpSer.recvfrom(BUFSIZE) #通过函数recvfrom返回元祖(消息,地址) ... 阅读全文
posted @ 2012-03-22 21:39 icamel 阅读(493) 评论(0) 推荐(0) 编辑
摘要:注意:通过self.request.recv()和self.request.send()两个函数来接受和发送消息;服务器端代码:from socketserver import (TCPServer, BaseRequestHandler)from time import ctimeHOST = ''PORT = 12345ADDR = (HOST, PORT)BUFSIZE = 1024class MyHandler(BaseRequestHandler): def handle(self): print('connected from:', self.cli 阅读全文
posted @ 2012-03-22 21:10 icamel 阅读(2606) 评论(0) 推荐(0) 编辑
摘要:注意的几点:1.StreamRequestHandler类支持像操作文件对象那样操作输入套字节;2.网络传输的数据需时bytes;3.客户端和服务器端发送的消息都必须加上回车和换行符号4.socketserver的请求处理器的默认行为是接受连接,得倒请求,然后关闭连接,而不是一直保持连接状态。从而多个连接可以并发进行。服务器端代码:from socketserver import (TCPServer, StreamRequestHandler)from time import ctimeHOST = ''PORT = 12345 ADDR = (HOST, PORT)clas 阅读全文
posted @ 2012-03-22 20:55 icamel 阅读(1403) 评论(0) 推荐(0) 编辑