| Subcribe via RSS

Johnny Cash hurt

July 1st, 2008 | No Comments | Posted in music

I hurt myself today
to see if I still feel
I focus on the pain
the only thing that’s real
the needle tears a hole
the old familiar sting
try to kill it all away
but I remember everything
what have I become?
my sweetest friend
everyone I know
goes away in the end
you could have it all
my empire of dirt

I will let you down
I will make you hurt

I wear this crown of thorns
on my liar’s chair
full of broken thoughts
I cannot repair
beneath the stain of time
the feelings disappear
you are someone else
I am still right here
what have I become?
my sweetest friend
everyone I know
goes away in the end
you could have it all
my empire of dirt

I will let you down
I will make you hurt

if I could start again
a million miles away
I would keep myself
I would find a way

Tags: ,

install VMware Server

June 23rd, 2008 | No Comments | Posted in computer

Ubuntu 8.04安装VMware Server 1.0.6

Tags:

Check Url

June 11th, 2008 | No Comments | Posted in php
 
<?php
$old_url = $_SERVER["REQUEST_URI"];
 
//检查链接中是否存在 ?
$check = strpos($old_url, '?');
 
//如果存在 ?
if($check !== false){
 
//如果 ? 后面没有参数,如 http://www.yitu.org/index.php?
if(substr($old_url, $check+1) == ''){
 
//可以直接加上附加参数
$new_url = $old_url;
 
}
 
else //如果有参数,如:http://www.yitu.org/index.php?ID=12
{
$new_url = $old_url.'&';
}
 
}else //如果不存在 ?
{
$new_url = $old_url.'?';
}
 
echo $new_url;
?>

详情见http://www.codebit.cn/pub/html/php_mysql/tip/other/check_url_parameter/

Tags: ,

mpd - Music Player Daemon

June 7th, 2008 | No Comments | Posted in linux

mpd是作为一个服务运行在后台,它不具备播放功能,你可以把它理解成一个服务端,你还需要一个客户端MPC来执行播放的功能。ubuntu下默认的源里面已经有现成的deb包,具体安装如下:
代码:
sudo apt-get install mpd mpc

这样就装好了mpd,以及命令行下的客户端mpc了,如果你不喜欢命令行下的操作,你还可以安装gmpc,gmpc是一个图形界面的客户端。
安装gmpc:
代码:
sudo apt-get install gmpc More »

Tags:

Rand() for images

June 3rd, 2008 | No Comments | Posted in php
<?php
echo rand(0, 5);
?>

rand这玩意可以用来生成指定范围内的随机数or字符,于是可以拿来做随机展示图片

<?php
	$domain = 'http://www.fouland.com/';
	echo $domain;
	echo '<img src="' . $domain . '/Path/currentName' . rand(0, 5) . '.gif"';
?>
Tags: