这样吧
///////1.php
<?php
header("location:img.gif");
?>///////2.php
<?php
echo "<img src=1.php>";
?>
其它详细的自己补充吧。
///////1.php
<?php
header("location:img.gif");
?>///////2.php
<?php
echo "<img src=1.php>";
?>
其它详细的自己补充吧。
解决方案 »
- 讨论下财务系统里面余额计算方法
- 我想写个脚本,就是登陆一个网站,然后在这个网站找到某个特定名称的链接,点进去,过1分钟退出,一直这样循环
- 请问这个PHP数组处理代码怎么写
- ssh2_connect()
- 关于事务功能的问题,请大家看一下
- 关于时间输出的问题,希望高手提示,谢谢
- 如让上面的c语言视频板块中只显示 只显示 c语言演讲人名字?
- 这是怎么回事呢?急谢谢
- phpize是干嘛用的?我找不到阿,但是编译的时候需要用到,帮助解决的哥们100分!
- php链接mysql数据库报错,PDO错误,php could not find driver
- 请看,是否是php在unix下的致命错误
- 问题没解决,继续问。请您帮忙!
如在后名没问题了。我遇到过,这样解决了!!
请你将你的显示图片的原码给我,我很需要!!
我的e-mail:[email protected]
在线等候!!不用加分只要显示图片的代码!!!
$fp=fopen(你的图片,"r");
$string=fread($fp,9999999);//确保读取全部的内容
$data=base64_encode($string);
//然后把$data 插入数据库
.
.
.
//显示的时候
$data=base64_decode($data);
然后
echo $data;不过用数据库来存储图片效率比较低
浅妄薄见,望与斟酌
<?
function save_pic_to_db($file,$file_name,$file_type)
{
global $DB; if( $file == "" || $file == "none" )
{
return 0;
} $image_content = addslashes(fread(fopen($file,"r"),filesize($file)));
$DB->query("insert into PIC values(null,'$file_name','$file_type','$image_content')"); return $DB->insert_id();
}
?>
二、根据图片的ID显示图片
//show_image.php
<?
if( !isset($id) )
{
exit;
}$DB->query("select filename,filetype,image from PIC where id='$id'");if( $DB->num_rows() == 0 )
{
exit;
}list($file_name,$file_type,$image_content) = $DB->fetch_array();
Header("Content-type: $file_type\n\n");echo $image_content;exit;?>