上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页
摘要: <?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) 阅读(396) 评论(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) 阅读(386) 评论(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) 阅读(623) 评论(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) 阅读(280) 评论(0) 推荐(0) 编辑
摘要: ?php$con=mysql_connect("192.168.1.200","root","123456",true,120000);mysql_select_db("lost_treasure",$con);mysql_query("set names 'gb2312'");$res = mysql_query("set @id=6", $con);$res = mysql_query("call shop_getById(@id)", $con);while($row = mysql_fetch_array($res)){ $arr[]=$row;}echo $arr[0][2];? 阅读全文
posted @ 2011-01-27 15:56 王翔(kingfly) 阅读(218) 评论(0) 推荐(0) 编辑
摘要: <?phpheader('Content-Type:text/html; charset=UTF-8');?> 阅读全文
posted @ 2010-12-02 11:18 王翔(kingfly) 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 在aspx页面中的body标签中加入onunload事件:<body onunload="Init()">然后在body中写上这个js方法:<script language="javascript"> function Init() { var v = "武汉"; var s = '<%=CshapVoid("' + v + '") %>'; alert(s);... 阅读全文
posted @ 2010-07-20 14:53 王翔(kingfly) 阅读(594) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--//varreg=/^(\d+)|([a-z]+)$/g筛选出从开头到结尾之间,1个或1个以上的数字,或者1个或1个以上的26个字母//varreg2=/^[\u4e00-\u9f5a]+$/g;筛选... 阅读全文
posted @ 2010-05-16 13:51 王翔(kingfly) 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 傻瓜老师又来了,本讲座报以学以致用,师傅带进门 修行靠个人的精神,不深入探讨,还请多指教~这堂课将的是基于表单的身份验证,其实某些时候,用于验证身份的账户和密码并不需要存在数据库或配置文件里,这时 web.config中的authentication节点就起大作用了。本堂课要完成的目的:验证用户身份成功,并登陆后台admin文件夹里的admin.aspx后台管理页面,否则禁止匿名用户访问项目中的a... 阅读全文
posted @ 2010-04-30 11:52 王翔(kingfly) 阅读(2473) 评论(7) 推荐(0) 编辑
摘要: 第一种方法: string s = "abcdeabcdeabcde"; string[] sArray = s.Split('c'); foreach (string i in sArray) Console.WriteLine(i.ToString()); Console.ReadKey(); 输出下面的结果: ab deab deab de 第二种方法: 我们看到了结果是以一个指定... 阅读全文
posted @ 2010-04-28 14:04 王翔(kingfly) 阅读(401) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页