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

使用Xdebug调试和优化PHP程序

1. 安装(简略过程) 编辑php.ini,加入下面几行: extension=php_xdebug.dll [Xdebug] xdebug.profiler_enable=on xdebug.trace_output_dir="I:/Projects/xdebug" xdebug.profiler_output_dir="I:/Projects/xdebug" 2. WinCacheGrin...

php去除价格后面多余的0

rtrim(rtrim($str, '0'), '.');

td中img的高度(height)问题

问题描述: 使用table布局,td包含img标签,如果遇到td的高度自动拉高。 那么可能是 img后面包含空白字符引起的。 解决办法: 1. 把空白字符去掉或者设置line-height:1px。如果没有空白字符,试试办法2 2. img{display:block;}  /*亲...

JS(javascript)获取屏幕高度

var s = ""; s += " 网页可见区域宽:"+   document.body.clientWidth; s += " 网页可见区域高:"+   document.body.clientHeight; s += " 网页可见区域宽:"+   document.body.offsetWidth     +"   (包括边线和滚动条的宽)"; s += "...

yii-iis6.0伪静态,隐藏index.php(ISAPI_rewrite)

1.第一种 [ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 RewriteEngine On #伪静态规则 RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*...

MYSQL如何添加索引

1.添加PRIMARY KEY(主键索引)ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` ) 2.添加UNIQUE(唯一索引) ALTER TABLE `table_name` ADD UNIQUE ( `column`) 3.添加INDEX(普通索引) ALTER TABLE `table_name` ADD INDEX index_...

css字间距设置

letter-spacing 来设置字与字间距_字符间距离

js(javascript)如果去掉 px单位,转化成整型

var tmp = parseInt("500px");

js(javascript)中取绝对值的2种方法!

1、abs() var aaa=-20; var bbb=Math.abs(aaa); 2、负负得正 var aaa=-20; var bbb=-aaa

Tagsystems: performance tests

In my previous article named “Tags: database schemas” we analysed different database schemas on how they could meet the needs of tag systems. In this article, the focus is on performance (speed). That is: if you want ...

Tags with MySQL fulltext(基于fulltext)

While setting up the promised performance test in my last post, I did some tests with the MySQL fulltext features and it seems that they are built for tagging systems. Take a look at the queries (if it is not clear fo...

Tags: Database schemas(数据库设计)

Recently, on del.icio.us mailinglist, I asked the question “Does anyone know the database schema of del.icio.us?”. I got a few private responses so I wanted to share the knowledge with the world. The Problem: You want...

通过使用offsetLeft和scrollLeft来分别实现图片无缝滑动

<style type="text/css"> *{ margin:0px; padding:0px; } #wrap{ width:890px; height:124px; position:relative; overflow:hidden; } #wrap ul{ height:108px; position:absolute; top:0px; ...

css同时使用背景图片和背景颜色

background:url(图片位置) #fff left top;

chrome中自动完成表单后input出现黄色背景的解决方案(input:-webkit-autofill)

在chrome中,如果设置了自动完成表单,那么用户在输入了表单并且再次进入到表单页面时,会发现表单下面有一个黄色的背景。例如下面这样: 对于纯色背景的表单,只需要在CSS里面加入类似下面的代码即可: input:-webkit-autofill { ...

IE条件注释判断语句

1. 只能被IE识别 <!--[if IE]> Only recognized in IE; 只能被 IE 识别; <![endif]--> 2. 只能被IE7或其他版本(自己修改版本号)识别 <!--[if IE 7]> Only recognized in IE7; 只能被 IE7 识别; <![endif...

根据地球上任意两点的经纬度计算两点间的距离

地球是一个近乎标准的椭球体,它的赤道半径为6378.140千米,极半径为6356.755千米,平均半径6371.004千米。如果我们假设地球是一个完美的球体,那么它的半径就是地球的平均半径,记为R。如果以0度经线为基准,那么根据地球表面任意两...

Yii中使用datepicker的几种方式

一,前端展示 例1,最简单好用的方式。简单在于不需要$model <?php $this->widget('zii.widgets.jui.CJuiDatePicker',array( 'attribute'=>'visit_time', 'language&#...

评论模块的设计

下面对比一些产品的评论模块的设计,包括机制、优点、缺点 网易博客新版博客中心动态   机制:最新评论显示在最前面,可以对任何一条评论和评论回复再评论(回复评论直接“XX回复XX显示),时间信息和回复按钮紧接着评论内容后面,评论...

yii数据库前缀

配置文件中main.php 'db'=>array( ... 'tablePrefix' => 'ecms_', ... ), model中 public function tableName() { return '{{slider}}'; }