摘要: 1、js实现(可实现局部打印)<input id="btnPrint" type="button" value="打印" onclick="javascript:window.print();" /> <input id="btnPrint" type="button" value="打印预览" onclick=preview(1) /> <style type="text/css" media=print 阅读全文
posted @ 2013-04-01 14:08 sorvey 阅读(259) 评论(0) 推荐(0)
摘要: update aset a.name=b.namefrom bwhere a.id=b.id 阅读全文
posted @ 2012-11-05 14:11 sorvey 阅读(150) 评论(0) 推荐(0)
摘要: 数据库连接失败could not find driver在调试一个PHP程序时,报了这个错误, could not find driver经过一番查找,结合自己的思考和实践,终于找到了问题所在.原来我的这个程序中用到了PDO对象, 连接mysql 5. 在PHP的默认设置中,只打开了php_pdo 模块, 没有打开php_pdo_mysql模块.所以才会出现找不到驱动程序的错误.修改php.iniextension=php_pdo.dllextension=php_pdo_firebird.dllextension=php_pdo_mssql.dllextension=php_pdo_mysq 阅读全文
posted @ 2012-08-04 16:10 sorvey 阅读(2987) 评论(0) 推荐(0)
摘要: Strict Standards: Non-static method JLoader…XAMPP安装完joomla后出现整页错误 用最新的XAMPP1.7.4安装joomla1.5.3,中途出现不少问题。好不容易解决了较低版本的You have an error in your SQL syntax及安装示范案例时报错:Error: the XML response that was returned from the server is invalid结果浏览页面时出现更恐怖的结果:出现整页错误!Strict Standards: Non-static method JLoader::im 阅读全文
posted @ 2012-08-03 12:37 sorvey 阅读(459) 评论(0) 推荐(0)
摘要: 将以下相应代码放到对应目录中的.htaccess文件,即可实现相应功能。关闭错误显示:php_flag display_startup_errors offphp_flag display_errors offphp_flag html_errors offphp_value docref_root 0php_value docref_ext 0只显示PHP错误:php_flagdisplay_errorsonphp_flagdisplay_startup_errors onphp_value error_reporting2047其中,“2047”为要显示的错误的级别,详细表格如下:1 E_ 阅读全文
posted @ 2012-08-03 11:14 sorvey 阅读(463) 评论(0) 推荐(0)
摘要: 1、PHP htmlspecialchars() 函数 htmlspecialchars() 函数把一些预定义的字符转换为 HTML 实体 详见:http://www.w3school.com.cn/php/func_string_htmlspecialchars.asp2、PHP mysql_fetch_object() 函数 详见:http://www.w3school.com.cn/php/func_mysql_fetch_object.asp 阅读全文
posted @ 2012-07-30 09:48 sorvey 阅读(144) 评论(0) 推荐(0)
摘要: 首先,如果你忘记了root密码,请看“Linux下如何修改用户密码和root密码“下面进入正文:Linux “文件系统” 中的文件默认归root用户所有。当我们要安装某些软件(如flash player 9)时,需要将一些文件粘贴到/usr/lib/firefox/plugins中(文件系统根目录为‘/’,主文件夹根目录为‘. /’)。此时,万恶的linux会提示:“您没有足够的权限执行此操作!“此时我们要作的就是修改这些文件夹的权限,使user用户(user代指登录linux所用的用户名)能够向这些文件夹中添加内容。首先打开终端,输入su root,回车敲入root密码。此时你在shell中 阅读全文
posted @ 2012-07-30 00:56 sorvey 阅读(613) 评论(0) 推荐(0)
摘要: 在使用THinkPHP的过程中难免会发送错误,所以ThinkPHP为开发者提供了一个调试模式,可以方便的为我们卡线并提示错误。但是我们要如何开启调试模式呢?首先在你已经部署好了ThinkPHP的项目目录然后注意是在入口文件开启调试模式,在入口文件index.php 中写入一下代码define(‘APP_DEBUG’,true); 首先删除Runtime目录 ,然后再次运行一下,你会发现runtime目录下面的~runtime.php 文件没有了,说明你的调试模式开启成功了之所以这个~runtime.php文件删除 ,这个文件是编译后的文件 会有缓存,所以在调试模式期间我们不用担心因为缓存而造成 阅读全文
posted @ 2012-07-23 23:28 sorvey 阅读(318) 评论(0) 推荐(0)
摘要: PHP 大小写转换1.将字符串转换成小写 strtolower(): 该函数将传入的字符串参数所有的字符都转换成小写,并以小定形式放回这个字符串.例:<?php $str = "I want To FLY"; $str = strtolower($str); echo $str;?>输出结果:i want to fly2.将字符转成大写 strtoupper(): 该函数的作用同strtolower函数相反,是将传入的字符参数的字符全部转换成大写,并以大写的形式返回这个字符串.用法同strtolowe()一样.3.将字符串首字符转换成大写 usfilst(): 阅读全文
posted @ 2012-07-23 10:50 sorvey 阅读(268) 评论(0) 推荐(0)
摘要: Ecmall的挂件是怎么显示的常常让人很费解:明明看到源码中首页调用的index.html中什么内容也没有,但前台就是一堆的挂件就显示出来了,究竟是什么回事呢,让我们来揭开ecmall挂件在首页中显示的神秘面纱。1.挂件widgets在目录data的page_config目录的中 比如首页生成的挂件是default.index.config.php2.挂件语句解析:return array ('widgets' =>array ('_widget_513' =>//挂件名称array ('name' => 'best_g 阅读全文
posted @ 2012-07-09 10:27 sorvey 阅读(747) 评论(0) 推荐(0)