就是说老是不能正常显示图片了,老是说 type error ,可是这个header函数就是这样字啊
解决方案 »
- smarty正则
- table不顶行和读出来的中文是乱码的问题,请大家帮忙看一下.
- PHP和MySQL Web开发(圣经)电子书及源码 强烈要求新手看一遍
- 大家帮帮忙 新手问题
- 急等,这是怎么回事。
- 请问object怎样转成string相关的问题~~~~~~~~~~~~~~~
- php程序只能放在linux主机的根目录下吗?
- 向大家请教一下,一些关于网上购物的问题
- PHP通过ODBC连接SQLSERVER2005 查询不了中文
- 关于thinkphp添加nav标签无法使用的问题,请大神指导一下!
- 如何在win2k安装php+apache+mysql+phpmyadmin?
- 谁有类似QQ的PHP代码?
echo $imagetype;//ok!
所以报错
//显示指定目录下的所有图形文件
function findfile($basedir)
{
$handle=opendir($basedir); echo "<table width=325>";
$file = strtolower(readdir($handle));
for($file = strtolower(readdir($handle));$file;)
{
echo "<tr>";
for($j=0;$j<5&&$file;$j++,$file=strtolower(readdir($handle)))
{
if(ereg(".gif|.jpg|.bmp",$file)) //如果是图形文件,就显示它的图形
echo "<td width='65' ONMOUSEOVER=\"this.bgColor='#dddddd';this.style.cursor='hand';\" ONMOUSEOUT=\"this.bgColor='#FFF4F0';\" onclick=\"javascript:opener.iconfresh('$file');window.close();\"><img src='pic/$file' alt='$file' height='65' width='65' border=0></td>\n";
else
$j--;
}
echo "</tr>\n";
}
echo "</table>";
}
?>
<html>
<head>
<title>功能模块图标选择</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFF4F0">
<p align="center"> <font color="#FF0000" size="+1">模块图标选择<br>
</font>
<br> <?php
/* include "header.php";
$result=mysql_query("select * from face");
while ($myrow=mysql_fetch_row($result))
{
$biaoqing="./face/".$myrow[1].".gif";
print "<td><a href=\"javascript:parent.biaoqing('$myrow[1]')\" target='input'><img src=$biaoqing border=0></a>";
print " ";
}*/
findfile("pic/");
?>
</body>
</html>
//显示指定目录下的所有图形文件
function findfile($basedir)
{
$handle=opendir($basedir);echo "<table width=325>";
$file = strtolower(readdir($handle));
for($file = strtolower(readdir($handle));$file;)
{
echo "<tr>";
for($j=0;$j<5&&$file;$j++,$file=strtolower(readdir($handle)))
{
if(ereg(".gif|.jpg|.bmp",$file)) //如果是图形文件,就显示它的图形
echo "<td width='65' ONMOUSEOVER=\"this.bgColor='#dddddd';this.style.cursor='hand';\" ONMOUSEOUT=\"this.bgColor='#FFF4F0';\" onclick=\"javascript:opener.iconfresh('$file');window.close();\"><img src='pic/$file' alt='$file' height='65' width='65' border=0></td>\n";
else
$j--;
}
echo "</tr>\n";
}
echo "</table>";
}
?>
<html>
<head>
<title>功能模块图标选择</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFF4F0">
<p align="center"> <font color="#FF0000" size="+1">模块图标选择<br>
</font>
<br> <?php
findfile("pic/");
?>
</body>
</html>
你这么用die的话,当然会出错了,要么加个取反,要么用&&,呵呵。