2013年12月26日

摘要: 阅读全文
posted @ 2013-12-26 13:15 以为是帅哥 阅读(824) 评论(0) 推荐(0) 编辑
 
摘要: $('#form1').submit(function(event) { event.preventDefault(); var formValues = $(this).serialize(); alert(formValues); $.get('servlet/form1', formValues, function(data) { alert(data); }); }); $(document).ready(function(){... 阅读全文
posted @ 2013-12-26 13:13 以为是帅哥 阅读(698) 评论(0) 推荐(0) 编辑
 
摘要: 静态化的好处,自己找吧。今天 介绍二种方法。第一种方法是真静态的。replace.php[php] view plaincopy new.html[html] view plaincopy 文章标题 文章标题 这里是主体 temp.htm[html] view plaincopy %title% %title% ... 阅读全文
posted @ 2013-12-26 10:28 以为是帅哥 阅读(207) 评论(0) 推荐(0) 编辑

2013年12月23日

摘要: //去掉html标签$string = preg_replace ( "/(\|\r|\n|\s|\[.+?\])/is", ' ', $string );//转义html标签$string = htmlspecialchars ( $string ); string strip_tags(string str); 阅读全文
posted @ 2013-12-23 09:37 以为是帅哥 阅读(120) 评论(0) 推荐(0) 编辑

2013年12月20日

摘要: zend_extension_ts="F:/wamp/bin/php/php5.2.6/ext/php_xdebug.dll"[Xdebug]xdebug.profiler_enable=onxdebug.trace_output_dir="d:/phpProjects/xdebug"xdebug.profiler_output_dir="d:/phpProjects/xdebug"xdebug.remote_enable=1xdebug.remote_host=127.0.0.1xdebug.remote_port=9000xdeb 阅读全文
posted @ 2013-12-20 14:52 以为是帅哥 阅读(230) 评论(0) 推荐(0) 编辑

2013年12月11日

摘要: 1、jquery捕捉回车键:[html] view plaincopy $("html").die().live("keydown",function(event){ if(event.keyCode==13){ //这里添加要处理的逻辑 } }); 2.jquery获得多个选中的checkbox值:[html] view plaincopy $('input[type="checkbox"][name="types"]:checked').each(func... 阅读全文
posted @ 2013-12-11 15:52 以为是帅哥 阅读(135) 评论(0) 推荐(0) 编辑

2013年11月29日

摘要: $encoding = mb_detect_encoding($str, array("ASCII",'UTF-8','GB2312','GBK','BIG5')); 阅读全文
posted @ 2013-11-29 16:23 以为是帅哥 阅读(116) 评论(0) 推荐(0) 编辑
 
摘要: QQ的账号登录及api操作,使用oauth 2.0 官方提供的sdk都太过庞大,这是我自己简化的,提供简单的账号登录、获取个人信息、发布分享等功能,如果需要其他功能可以根据官方的api文档自行添加 [文件] qq.php001 appid=$appid;011 $this->appkey=$appkey;012 $this->access_token=$access_token;013 }014 015 function login_url($callback_url, $scope=''... 阅读全文
posted @ 2013-11-29 10:45 以为是帅哥 阅读(946) 评论(0) 推荐(0) 编辑
 
摘要: 第三方平台账号登入流程总结(附新浪微博一键登入代码) 最近了解了一下第三方登入的API,包括新浪微博、腾讯微博、人人网,因为QQ的API暂时还没成功实现,所以在这里还希望有成功实现的人能给我点拨下,或者提供demo参考。 下面废话不多说,先上一张流程图,经过我的实验,大致所有的流程都是如此: 阅读全文
posted @ 2013-11-29 10:03 以为是帅哥 阅读(181) 评论(0) 推荐(0) 编辑

2013年11月18日

摘要: 在php5.3环境下运行oscommerce,常常会出现Deprecated: Function ereg() is deprecated in...和Deprecated: Function ereg_replace() is deprecated in...这些类型的报错提示。 其原因在于:php5.3以上的版本不支持ereg()函数,而是使用preg_match()函数;不支持ereg_replace()函数,而使用preg_replace()函数。 解决方法:将不支持的函数修改为支持的函数即可。 例如: Deprecated: Function eregi() is de... 阅读全文
posted @ 2013-11-18 17:38 以为是帅哥 阅读(236) 评论(0) 推荐(0) 编辑