为了中国足球,请你们不要看球赛
谢亚龙,你的脸皮够厚了,还有脸有这个位置?你还想把自己当成官?
或是还想在这个位上,分红吧!
大家在烧钱,你却在分红,难道你们都是这样无耻吗?之前有一个扬一民,
那张朝阳也和你有关系吧,要不然那样都会上!
谢亚龙,你应该去外交部吧,哈哈,或是去禁网处!
谢亚龙你会主动的走吗?这个不是班子团结的问题,我也知道,你不能让你们的班子没有面子,像之前的一个于,是乎让谁的面子丢了的问题,或是得罪了和sheng 或是八爷
不知道,代表门喜不喜欢足球! 听说代表门都没有空看球!或是我们的球迷没有权,或是你要我们代表团结,我等了一个2006在等了一个2010,就是没有等出一个代表! 我真得希望能有一个像赵梦?一样的人出来,唉,中国就是中国
引用
能抵制某大超市,咱也能抵制足协,是球迷的都应该联合起来拒绝看中超中甲中国任何的中国足球,一直到足协那些猪领导滚蛋为止,你们漫骂的不够吗,看中国足球不上火吗,那我们就联合起来,让他现场O观众。 希望看到此贴的多多宣传下
谢亚龙,你的脸皮够厚了,还有脸有这个位置?你还想把自己当成官?
或是还想在这个位上,分红吧!
大家在烧钱,你却在分红,难道你们都是这样无耻吗?之前有一个扬一民,
那张朝阳也和你有关系吧,要不然那样都会上!
谢亚龙,你应该去外交部吧,哈哈,或是去禁网处!
谢亚龙你会主动的走吗?这个不是班子团结的问题,我也知道,你不能让你们的班子没有面子,像之前的一个于,是乎让谁的面子丢了的问题,或是得罪了和sheng 或是八爷
不知道,代表门喜不喜欢足球! 听说代表门都没有空看球!或是我们的球迷没有权,或是你要我们代表团结,我等了一个2006在等了一个2010,就是没有等出一个代表! 我真得希望能有一个像赵梦?一样的人出来,唉,中国就是中国
[codes=C#] private void btn_select_Click(object sender, EventArgs e)
{
OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Filter = "All files (*.xls)|*.xls|All files (*.xls)|*.xls";
fdlg.FilterIndex = 2;
if (fdlg.ShowDialog() == DialogResult.OK)
{
txt_file_path.Text = fdlg.FileName;
}
}[/codes]
{
OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Filter = "All files (*.xls)|*.xls|All files (*.xls)|*.xls";
fdlg.FilterIndex = 2;
if (fdlg.ShowDialog() == DialogResult.OK)
{
txt_file_path.Text = fdlg.FileName;
}
}[/codes]
大公司的PHP面试题
[
2008/06/11 17:14 | by Else ]
2008/06/11 17:14 | by Else ]
文章来自csdn 转到这里是为了做出答案
PHP题目
1. 如何用php的环境变量得到一个网页地址的内容?ip地址又要怎样得到?
2. 求两个日期的差数,例如2007-2-5 ~ 2007-3-6 的日期差数
3. 请写一个函数,实现以下功能:
字符串“open_door” 转换成 “OpenDoor”、”make_by_id” 转换成 ”MakeById”。
4. 要求写一段程序,实现以下数组$arr1转换成数组$arr2:
$arr1 = array (
'0' => array ('fid' => 1, 'tid' => 1, 'name' =>'Name1' ),
'1' => array ('fid' => 1, 'tid' => 2 , 'name' =>'Name2' ),
'2' => array ('fid' => 1, 'tid' => 5 , 'name' =>'Name3' ),
'3' => array ('fid' => 1, 'tid' => 7 , 'name' =>'Name4' ),
'4' => array ('fid' => 3, 'tid' => 9, 'name' =>'Name5' )
);
$arr2 = array (
'0' => array (
'0' => array ( 'tid' => 1, 'name' => 'Name1'),
'1' => array ( 'tid' => 2, 'name' => 'Name2'),
'2' => array ( 'tid' => 5, 'name' => 'Name3'),
'3' => array ( 'tid' => 7, 'name' => 'Name4')
),
'1' => array (
'0' => array ( 'tid' => 9, 'name' => 'Name5' )
)
);
PHP题目
1. 如何用php的环境变量得到一个网页地址的内容?ip地址又要怎样得到?
2. 求两个日期的差数,例如2007-2-5 ~ 2007-3-6 的日期差数
3. 请写一个函数,实现以下功能:
字符串“open_door” 转换成 “OpenDoor”、”make_by_id” 转换成 ”MakeById”。
4. 要求写一段程序,实现以下数组$arr1转换成数组$arr2:
$arr1 = array (
'0' => array ('fid' => 1, 'tid' => 1, 'name' =>'Name1' ),
'1' => array ('fid' => 1, 'tid' => 2 , 'name' =>'Name2' ),
'2' => array ('fid' => 1, 'tid' => 5 , 'name' =>'Name3' ),
'3' => array ('fid' => 1, 'tid' => 7 , 'name' =>'Name4' ),
'4' => array ('fid' => 3, 'tid' => 9, 'name' =>'Name5' )
);
$arr2 = array (
'0' => array (
'0' => array ( 'tid' => 1, 'name' => 'Name1'),
'1' => array ( 'tid' => 2, 'name' => 'Name2'),
'2' => array ( 'tid' => 5, 'name' => 'Name3'),
'3' => array ( 'tid' => 7, 'name' => 'Name4')
),
'1' => array (
'0' => array ( 'tid' => 9, 'name' => 'Name5' )
)
);
这个是目前用cookie做的,之前听说php4对cookie的支持不好之类的话,没有试过,但是现在认为,没有必要为php4而限制代码
现在这个是用一个cookie来保存这些投票
[codes=php]if (!isset($_COOKIE['time_report']))
{
$_COOKIE['time_report']=array();
}
foreach ($_COOKIE["time_report"] as $upid)
{
if ($upid==$_POST['up'])
{
die("你已投过票了");
}
}
setcookie("time_report[".$_POST['up']."]",$_POST['up'],time()+3600);
$db->query(sprintf("UPDATE ck_comment set zc=zc+1 where id=%d",$_POST['up']));
$sql=sprintf("select zc from ck_comment where id=%d",$_POST['up']);
$rs=$db->rows($sql);
echo $rs['zc'];[/codes]
现在这个是用一个cookie来保存这些投票
[codes=php]if (!isset($_COOKIE['time_report']))
{
$_COOKIE['time_report']=array();
}
foreach ($_COOKIE["time_report"] as $upid)
{
if ($upid==$_POST['up'])
{
die("你已投过票了");
}
}
setcookie("time_report[".$_POST['up']."]",$_POST['up'],time()+3600);
$db->query(sprintf("UPDATE ck_comment set zc=zc+1 where id=%d",$_POST['up']));
$sql=sprintf("select zc from ck_comment where id=%d",$_POST['up']);
$rs=$db->rows($sql);
echo $rs['zc'];[/codes]
开发一些程序,要得到注册用户的时区,
以前一直没有办法,后来发现js的date 有这个功能,就是他的时间格式
所以只要保存一个字段或是用ajax,写进这个时间,就可以得到这个时区
还有一个问题,如何记录一个客户买过的商品,
如果没有数据库的话,
应该用是用cookie随机生成一个数组,这样保存这些资料!
还有有效的吧,
你认为呢
关于上面的这些功能,在一些服务型网站中是非常有效的!
以前一直没有办法,后来发现js的date 有这个功能,就是他的时间格式
所以只要保存一个字段或是用ajax,写进这个时间,就可以得到这个时区
还有一个问题,如何记录一个客户买过的商品,
如果没有数据库的话,
应该用是用cookie随机生成一个数组,这样保存这些资料!
还有有效的吧,
你认为呢
关于上面的这些功能,在一些服务型网站中是非常有效的!
VirtualBox-1.6.2-Win_x86.msi
[
2008/06/10 12:33 | by Else ]
2008/06/10 12:33 | by Else ]
对于 VMWare、Virtual PC 这些虚拟机软件,可能大家都比较熟悉。今天我要介绍的是另一个虚拟机软件——VirtualBox。VirtualBox 是一款功能强大的 x86 虚拟机软件,它不仅具有丰富的特色,而且性能也很优异。更可喜的是,VirtualBox 于数日前走向开源,成为了一个发布在 GPL 许可之下的自由软件。

在 VirtualBox 中运行 Ubuntu
VirtualBox 可以在 Linux 和 Windows 主机中运行,并支持在其中安装 Windows (NT 4.0、2000、XP、Server 2003、Vista)、DOS/Windows 3.x、Linux (2.4 和 2.6)、OpenBSD 等系列的客户操作系统。
假如你曾经有用过虚拟机软件的经历的话,相信使用 VirtualBox 不在话下。即便你是一个新手,也没有关系。VirtualBox 提供了详细的文档,可以助你在短期内入门。
想要试试 VirtualBox?那么下载它吧。
下面是我放uubox的地址
http://cukunet.uubox.net/self.u/%E8%99%9A%E6%8B%9F%E5%B7%A5%E5%85%B7/VirtualBox-1.6.2-Win_x86.msi/
在 VirtualBox 中运行 Ubuntu
VirtualBox 可以在 Linux 和 Windows 主机中运行,并支持在其中安装 Windows (NT 4.0、2000、XP、Server 2003、Vista)、DOS/Windows 3.x、Linux (2.4 和 2.6)、OpenBSD 等系列的客户操作系统。
假如你曾经有用过虚拟机软件的经历的话,相信使用 VirtualBox 不在话下。即便你是一个新手,也没有关系。VirtualBox 提供了详细的文档,可以助你在短期内入门。
想要试试 VirtualBox?那么下载它吧。
下面是我放uubox的地址
http://cukunet.uubox.net/self.u/%E8%99%9A%E6%8B%9F%E5%B7%A5%E5%85%B7/VirtualBox-1.6.2-Win_x86.msi/
php cookie
[
2008/06/10 11:07 | by Else ]
2008/06/10 11:07 | by Else ]
昨天晚上到现在的一个测试
代码通过测试
[codes=php]// 设定 cookie
for ($i = 0; $i < 10; $i++) {
$time[$i] = time();
setcookie("time_report[$i]",$time[$i], $time[$i]+3600*$i);
}
print_r($_COOKIE["time_report"]);
?>
echo $_COOKIE["time_report"][2];
?>
echo $_COOKIE["time_report[2]"];//这个是错误的
?> [/codes]
代码通过测试
[codes=php]// 设定 cookie
for ($i = 0; $i < 10; $i++) {
$time[$i] = time();
setcookie("time_report[$i]",$time[$i], $time[$i]+3600*$i);
}
print_r($_COOKIE["time_report"]);
?>
echo $_COOKIE["time_report"][2];
?>
echo $_COOKIE["time_report[2]"];//这个是错误的
?> [/codes]
在utf-8下通过javascript的url编码测试
[
2008/06/08 17:19 | by Else ]
2008/06/08 17:19 | by Else ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
document.write(escape("哈哈")+"<br>");//原来用这个加密测试
document.write(unescape("%u54C8%u54C8")+"<br>");//
document.write(encodeURIComponent("哈哈")+"<br>");
document.write(decodeURIComponent("%E5%93%88%E5%93%88")+"<br>");
</script>
</head>
<body>
<?php
echo urldecode("%E5%93%88%E5%93%88");
echo "<br>";
echo rawurldecode("%E5%93%88%E5%93%88");
echo "<br />";
echo utf8_decode("%E5%93%88%E5%93%88");
echo "<br />";
echo "%E5%93%88%E5%93%88";
echo "<br />";
echo $_GET['act'];
echo "<br />";
echo urlencode($_GET['act']);
?>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
document.write(escape("哈哈")+"<br>");//原来用这个加密测试
document.write(unescape("%u54C8%u54C8")+"<br>");//
document.write(encodeURIComponent("哈哈")+"<br>");
document.write(decodeURIComponent("%E5%93%88%E5%93%88")+"<br>");
</script>
</head>
<body>
<?php
echo urldecode("%E5%93%88%E5%93%88");
echo "<br>";
echo rawurldecode("%E5%93%88%E5%93%88");
echo "<br />";
echo utf8_decode("%E5%93%88%E5%93%88");
echo "<br />";
echo "%E5%93%88%E5%93%88";
echo "<br />";
echo $_GET['act'];
echo "<br />";
echo urlencode($_GET['act']);
?>
</body>
</html>
一、打开CD-ROM
mciSendString("Set cdAudio door open wait",NULL,0,NULL);
二、关闭CD_ROM
mciSendString("Set cdAudio door closed wait",NULL,0,NULL);
三、关闭计算机
OSVERSIONINFO OsVersionInfo; //包含操作系统版本信息的数据结构
OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&OsVersionInfo); //获取操作系统版本信息
if(OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
//Windows98,调用ExitWindowsEx()函数重新启动计算机
DWORD dwReserved;
ExitWindowsEx(EWX_REBOOT,dwReserved); //可以改变第一个参数,实现注销用户、
//关机、关闭电源等操作
// 退出前的一些处理程序
}
mciSendString("Set cdAudio door open wait",NULL,0,NULL);
二、关闭CD_ROM
mciSendString("Set cdAudio door closed wait",NULL,0,NULL);
三、关闭计算机
OSVERSIONINFO OsVersionInfo; //包含操作系统版本信息的数据结构
OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&OsVersionInfo); //获取操作系统版本信息
if(OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
//Windows98,调用ExitWindowsEx()函数重新启动计算机
DWORD dwReserved;
ExitWindowsEx(EWX_REBOOT,dwReserved); //可以改变第一个参数,实现注销用户、
//关机、关闭电源等操作
// 退出前的一些处理程序
}
et的新功能,其实et都有了,我这里复制一下,这样好记些
[
2008/06/06 01:38 | by Else ]
2008/06/06 01:38 | by Else ]
利用模板函数writer功能来写入文件cache_htm/test.htm
HTM:template/et_d1.htm
$tl->set_file('et_d2');
$tl->p();
?> [/code]
HTM:template/et_d2.htm
利用模板函数reader功能来读取文件example/et_d/1.php
得到的结果如下:
reader($rfile); $tl->set_file('et_d1'); $tl->p(); ?>
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$tl->set_file('et_c3');
$tl->p();
?>
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$wfile = 'cache_htm/test.htm';
$data = '测试ET写入数据功能!';
$data = $tl->writer($wfile,$data); PHP:example/et_d/1.php
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$rfile = 'example/et_d/1.php';
$data = $tl->reader($rfile);
$tl->set_file('et_d1');
$tl->p();
?>
[code]<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$rfile = 'example/et_d/1.php';
$data = $tl->reader($rfile);
$tl->set_file('et_d1');
$tl->p();
?>
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$wfile = 'cache_htm/test.htm';
$data = '测试ET写入数据功能!';
$data = $tl->writer($wfile,$data); PHP:example/et_d/1.php
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$rfile = 'example/et_d/1.php';
$data = $tl->reader($rfile);
$tl->set_file('et_d1');
$tl->p();
?>
[code]<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$rfile = 'example/et_d/1.php';
$data = $tl->reader($rfile);
$tl->set_file('et_d1');
$tl->p();
?>
HTM:template/et_d1.htm
利用模板函数reader功能来读取文件{rfile}
得到的结果如下:
{data}
$tl->set_file('et_d2');
$tl->p();
?> [/code]
HTM:template/et_d2.htm
<p>利用模板函数writer功能来写入文件{wfile}</p>
<p>写入内容为:{data}</p>
<p><a href="../../cache/test.htm" target=_blank>点此访问写入数据内容</a></p>
<p>写入内容为:{data}</p>
<p><a href="../../cache/test.htm" target=_blank>点此访问写入数据内容</a></p>
利用模板函数reader功能来读取文件example/et_d/1.php
得到的结果如下:
reader($rfile); $tl->set_file('et_d1'); $tl->p(); ?>
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$tl->set_file('et_c3');
$tl->p();
?>
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$user_list = array(
array(
'name' => 'md-chinese',
'pass' => '654321',
),
array(
'name' => 'test',
'pass' => '123456',
)
);
//最关键的函数就是清除旧数据
$tl->clear();
unset($K,$V,$showdata);
foreach ($user_list AS $key=>$V) {
$tl->set_file('et_b7_1');
$showdata .= $tl->r();
}
$tl->set_file('et_b7');
$tl->p();
?>
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$user_list = array(
array(
'name' => 'md-chinese',
'pass' => '654321',
),
array(
'name' => 'test',
'pass' => '123456',
)
);
//最关键的函数就是清除旧数据
$tl->clear();
unset($K,$V,$showdata);
foreach ($user_list AS $key=>$V) {
$tl->set_file('et_b7_1');
$showdata .= $tl->r();
}
$tl->set_file('et_b7');
$tl->p();
?>
HTM:template/et_b7_1.htm
账号:{V['name']}<br>
密码:{V['pass']}<br><br>
账号:{V['name']}<br>
密码:{V['pass']}<br><br>
HTM:template/et_b7.htm
<p>测试循环模板并且将结果显示在当前模板中</p>
<p>{showdata}</p>
<p>上面为测试循环内容</p>
账号:{V['name']}<br>
密码:{V['pass']}<br><br>
账号:{V['name']}<br>
密码:{V['pass']}<br><br>
HTM:template/et_b7.htm
<p>测试循环模板并且将结果显示在当前模板中</p>
<p>{showdata}</p>
<p>上面为测试循环内容</p>
<?php
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$cate = array(
'分类1' => array('计算机','报纸','杂志','鼠标'),
'分类2' => array('青菜','白菜'),
'分类3' => array('橘子','香蕉','苹果')
);
$tl->set_file('et_b6');
$tl->p();
?>
chdir('../../'); //指定到根目录
include"template.php"; //Ease Template
$tl = new template();
include"example/files.php"; //Source Code
$cate = array(
'分类1' => array('计算机','报纸','杂志','鼠标'),
'分类2' => array('青菜','白菜'),
'分类3' => array('橘子','香蕉','苹果')
);
$tl->set_file('et_b6');
$tl->p();
?>
嵌套循环:<br>
<table border="1" width="300" bordercolor="#C0C0C0">
<!-- $cate AS $ck=>$cv -->
<tr>
<td><b>{ck}</b></td>
</tr>
<!-- $cv AS $V -->
<tr>
<td> ->{V}</td>
</tr>
<!-- END -->
<!-- END -->
<table border="1" width="300" bordercolor="#C0C0C0">
<!-- $cate AS $ck=>$cv -->
<tr>
<td><b>{ck}</b></td>
</tr>
<!-- $cv AS $V -->
<tr>
<td> ->{V}</td>
</tr>
<!-- END -->
<!-- END -->














