随笔分类 -  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) 阅读(282) 评论(0) 推荐(0)
摘要:<?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) 阅读(411) 评论(0) 推荐(0)
摘要: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) 阅读(398) 评论(0) 推荐(0)
摘要:初始化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) 阅读(657) 评论(0) 推荐(1)
摘要:网上下载: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) 阅读(287) 评论(0) 推荐(0)
摘要:<?phpheader('Content-Type:text/html; charset=UTF-8');?> 阅读全文
posted @ 2010-12-02 11:18 王翔(kingfly) 阅读(244) 评论(0) 推荐(0)