嗨,新朋友,很高兴认识你,欢迎来到我的博客。
分类存档: web开发

13套精美Web应用程序图标素材

图标用于向用户传递信息,不管是在网页还是Web应用程序中都非常需要。这些小小的图标元素能够告诉用户怎么到下一页,如何添加、删除和取消等等各种操作。设计精美的图标不仅能增加界面的美观,也能够让应用程序更加易用。下面收集的13...

mysql查询null

select * from test where time is null

phpmailer发邮件中文乱码的问题

$mail = new PHPMailer(); $mail->CharSet='UTF-8';//注意大小写

mysql max_open_files,max_connections,table_cache三者之间关系

table_cache * 2 + max_connections = max_open_files 以上是大约关系,不能绝对等于。

PHP输出javascript,alert中文乱码解决办法

echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>提示</title><script language=javascript>alert("超级计算机&q...

javascript获取当前时间戳

第一种方法: var timestamp = Date.parse(new Date()); 结果:1280977330000 第二种方法: var timestamp = (new Date()).valueOf(); 结果:1280977330748 第三种方法: var timestamp=new Date().getTime(); 结果:1280977330748 第...

javascript延迟加载setTimeout

function test() { alert('www.sunhaibing.com'); } setTimeout(test, 1000); 延迟1秒执行

IE6下position:absolute定位错误的bug和解决方法

例: <style> .test_1 { position:relative; margin:0 auto; text-align:center; width:500px; height:300px; background:#006600; } .c_1 { position:absolute; width:100px; height:20px; background:...

Warning: preg_match() [function.preg-match]: Unknown modifier 'c'

错误写法:preg_match("/<center>(.*)</center>/",$cont,$reg); 这样写不对,因为缺少了转义字符 \ 正确写法:preg_match("/<center>(.*)<\/center>/",$cont,$reg);

JavaScript弹出新窗口

【1、最基本的弹出窗口代码】 其实代码非常简单: <SCRIPT LANGUAGE="javascript"> <!-- window.open ('page.html') --> </SCRIPT> 因为着是一段javascripts代码,所以它们应该放在<SCRIPT LANGUAGE="javascript...

javascript对url进行encode的两种方式

javascript可以使用的内置函数有: encodeURI() encodeURIComponent() 他们都是用utf-8的编码方式 encodeURI(),用来encode整个URL,不会对下列字符进行编码:+ : / ; ?&。它只会对汉语等特殊字符进行编码 encodeURIComponent (),...

如何移除display: inline-block或display: inline之间的间隔

这个原因跟字体类型和大小有关系 解决办法: 1. 雅虎 YUI 的解决方法是把letter-spacing和word-spacing改成某个负值能解决(不同的字体值不同) .span { letter-spacing: -.5em; /* webkit: collapse white-space between units ...

如何让php的json_encode不转义反斜杠?

解决办法: 1. 正则替换 echo str_replace("\\/", "/", json_encode("2013/4/21")); 2. 若是php版本是5.4的话: echo json_encode("2011/7/11", JSON_UNESCAPED_SLASHES);

Yii-CCaptcha不显示

解决办法: 找到framework\web\widgets\captcha\CCaptchaAction.php 在header('Pragma: public');前加 ob_clean();

urldecode不能将&解码成&

解决办法: 使用htmlspecialchars_decode就可以将&amp;解码成&了。 <code><span style="color: #0000ff;"><strong>htmlspecialchars_decode</strong></span>('http://www.sunha...

PHP 添加前导0,去掉前导0

当然不只是可以加0,去0,可以添加任何前导 添加前导: 使用PHP自己提供的函数: str_pad (PHP 4 >= 4.0.1, PHP 5) str_pad -- Pad a string to a certain length with another string Description string str_pad ( string input,...

Yii-assets目录生成及修改

assets的作用是方便模块化,插件化的,一般来说出于安全原因不允许通过url访问protected下面的文件,但是我们又希望将module单独出来,所以需要使用发布,即将一个目录下的文件复制一份到assets下面方便通过url访问。 assets设置对应...

ie6-PNGFix透明图片解决办法,支持css sprites

众所周知,IE6对png-24的支持非常糟糕。不过现在ie png fix出现了,一举解决了这个讨厌的问题,现在我们可以尽情在web设计中使用png-24图像了 首先我们需要下载一个JS,JS下载地址: http://www.dillerdesign.com/experiment/DD_belat...

SQL添加、修改和删除表的字段

添加: alter table `sunhaibing` Add(name Char(8) not null default '' Before ename); 删除: alter table `sunhaibing` drop column name; 修改 alter table `sunhaibing` modify column name text;  

php实现下载成桌面快捷方式

如果想自定义快捷键,那么自己建一个快捷方式,然后打开记事本,把快捷方式拖进去,看到代码。然后替换$shortcut的值。就ok! $Shortcut = "[InternetShortcut] URL=http://www.sunhaibing.com/ IconIndex=43 IconFile=C:\Win...