PHP
PHP多维数组排序
摘要: $a = Array ([0] => Array ( [level] => 25 [nick_name] => 王贵)[1] => Array ( [level] => 6 [nick_name] => 张三)[2] => Array ( [level] => 30 [nick_name] => 李四)[3] => Array ( [level] => 25 [nick_name] => 王五)[4] => Array ( [level] => 21 [nick_name] => 六儿)[5] =>阅读全文
posted @ 2012-05-16 15:26 王翔(kingfly) 阅读(2) | 评论 (0) 编辑
php创建目录及上传文件代码!
摘要: <?phpheader("Content-type: text/html; charset=utf-8");//上传文件代码 if($_FILES["file"]["error"] > 0){ echo "错误:" . $_FILES["file"]["error"];}else{ echo "文件名:" . $_FILES["file"]["name"] . "<br />&quo阅读全文
posted @ 2011-07-01 18:40 王翔(kingfly) 阅读(54) | 评论 (0) 编辑
php的smarty的foreach以及section循环方法!
摘要: foreach循环法:main.php<?phpinclude "class/Smarty.class.php";define('__SITE_ROOT', 'd:/appserv/www/smarty_test');require_once 'includes/DB.class.php';$tpl = new Smarty();$tpl->template_dir = __SITE_ROOT . "/templates/";$tpl->compile_dir = __SITE_ROOT 阅读全文
posted @ 2011-06-30 14:40 王翔(kingfly) 阅读(47) | 评论 (0) 编辑
ajax与php交互的get和post两种实现方式
摘要: 初始化ajax对象 InitAjax.js/* 初始化一个xmlhttp对象 */function InitAjax(){//ajax初始化 var ajax=false; try{ ajax=new ActionXObject("Msxml2.XMLHTTP"); }catch(e){ try{ ajax=new ActionXObject("Miscrosoft.XMLHTTP"); }catch(e){ ajax=false; } } if(!ajax&&typeof XMLHttpRequest!='undefined&#阅读全文
posted @ 2011-06-29 11:48 王翔(kingfly) 阅读(75) | 评论 (0) 编辑
PHP在线编辑器fckeditor应用
摘要: 网上下载:FCKeditor_2.6.5add_news.php--------------------<?phpinclude_once 'fckeditor/fckeditor.php';$sBasePath = $_SERVER['PHP_SELF'];$sBasePath = dirname($sBasePath) . "/fckeditor/"; //fckeditor.php所在的根目录$ed = new FCKeditor('con') ;$ed->BasePath = $sBasePath ;$ed阅读全文
posted @ 2011-04-10 20:56 王翔(kingfly) 阅读(77) | 评论 (0) 编辑
zend Studio中文乱码解决办法
摘要: <?phpheader('Content-Type:text/html; charset=UTF-8');?>阅读全文
posted @ 2010-12-02 11:18 王翔(kingfly) 阅读(67) | 评论 (0) 编辑