php
JavaNoob
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
将数组转为以指定字符分隔的字符串
implode(splitor,array)原创 2009-03-30 00:13:40 · 426 阅读 · 0 评论 -
从DISCUZ中拿出来的UBBCODE函数
[code="php"]原创 2010-10-18 18:58:57 · 317 阅读 · 0 评论 -
将XML转为数组结构的函数
此方法要求传入一个节点(DOMNode),返回该节点下的所以子节点组成的数组。比如一个XML文件:[code="xml"] file1.txt 2009-09-07 2009-09-08 file2.txt 2009-09-01 ...2009-09-08 11:37:00 · 266 阅读 · 0 评论 -
PHP的ZIP压缩类
一个简单的用法:[code="php"]$filename= "product_images.zip";$test = new zip_file($filename);$test->set_options(array('inmemory' => 0, 'recurse' => 0, 'storepaths' => 0));$test->add_files("images_pac...原创 2009-09-02 15:47:32 · 176 阅读 · 0 评论 -
记录表单数据的函数
[code="php"] //保存表单数据到cookies函数 function saveRequest($scope) { //scope will be a array like $_POST or $_GET while(list($key,$value)=each($scope)) { setcookie("request_".$key,$value)...2009-09-02 00:28:28 · 148 阅读 · 0 评论 -
PHP在程序中关闭魔术引号
[code="php"]if (ENABLEMQG=='0'&&get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $val...原创 2009-08-31 17:20:17 · 242 阅读 · 0 评论 -
一个简单易用的PHP分页类
使用实例:[code="php"]$sql = "select * from `table1`"; //一个简单的查询$page = new Page('',$sql,$_GET['page'],20,"?page=");$rows = $page->list;foreach($rows as $row){ echo $row['title']."";}ec...2009-08-20 16:35:23 · 218 阅读 · 0 评论 -
UCENTER的密码加密方式
md5(concat(md5('密码'),salt))原创 2009-07-29 09:05:18 · 257 阅读 · 0 评论 -
PHP获取远程页面的数据
$html = file_get_contents('http://www.yespy.net');原创 2009-06-30 11:10:17 · 236 阅读 · 0 评论 -
一个计算页面执行时间的简单类
以后可能会扩充些实用的功能用法:[code="php"][/code][code="php"][/code]2009-06-02 16:56:18 · 133 阅读 · 0 评论 -
一个记录用户访问页面的类,顺便记一下PHP4的重载方式
当用户浏览某页面时需要转向到注册页面,注册完成后希望用户能返回到之前想访问的页面,这个类或许有用,目前该类还在完善中.[code="php"][/code]2009-05-27 11:13:11 · 150 阅读 · 0 评论 -
一个简单的数据库类
[code="php"]2009-05-25 16:21:28 · 195 阅读 · 0 评论 -
PHP constant函数取常量值
constant()函数返回了一个常量值。原创 2009-05-05 15:33:34 · 257 阅读 · 0 评论 -
Discuz7.2 发贴API
实现远程向DISCUZ7.2 POST数据[code="php"]接受参数:auth_username post/get 用户名auth_password post/get 密码question_title post 标题question_content post 内容answers[] post 回复[数组]board_name post 版块名称返回...原创 2010-10-28 16:37:24 · 225 阅读 · 0 评论
分享