php5.4安装完成可是图片无法显示 phpinfo();可以显示,gd库什么的都加了可是我的网站打开是没有图片的额怎么会这样啊 求解 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Linux吧?我从5.3升级到5.4的时候也碰到了,重新编译整个gd 部分吧,要不就yum来yum去好了. 这不是代码的问题,我在公司的电脑可以显示的,现在css样式和图片都不显示了 本来是5.1的php就可以的现在是5.4怎么就不可以了 什么yum来yum去啊,gd重新编译不会额,我的是win7 +iis6+php5.4 win7 iis 就不清楚啦,那肯定不是yum来yum去了,你的图也看不到,不清楚什么情况. 我说了我的代码没有问题的么,<?phpsession_start();if(!empty($_SESSION['WEB_COOKIE'.'admin'])){ header("location:admincp.php"); exit(); }include "../inc/dbconfig.php";include "inc/function.php";include "../inc/mysql.class.php";include "../inc/webconfig.php";?><!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>后台_<?= $web_company ?></title><script type="text/javascript" src="../js/jquery.js"></script><script type="text/javascript" src="../js/jquery.validate.min.js"></script><script type="text/javascript" src="../js/colorbox-min.js"></script><style type="text/css">@import url("css/colorbox.css");</style><link href="css/admincss.css" rel="stylesheet" type="text/css" /><script type="text/javascript">$(function(){ $('#loginform').validate(); $("#getpwd").colorbox({iframe:true, scrolling:false, innerWidth:400, innerHeight:150, href:'getpwd.php'});})</script><!--[if IE 6]><script type="text/javascript" src="../js/stopIE6.js"></script><![endif]--></head><body ><div id="top"> <div class="f_r wt12 b"><script language=javascript src="js/thetime.js"></script></div></div><div id="logo"><img src="images/logo.png" width="437" height="109" /></div><div id="main"> <div id="login"> <div id="tip"><img src="images/tip_img.jpg" alt="<?php echo $web_company ?>" width="60" height="54" /></div> <div id="login_title">系统登录</div> <div id="login_form"> <form id="loginform" name="form1" method="post" action="loginok.php" target="_top"> <dl> <dt>用户名:</dt> <dd><INPUT name="username" class="input_user required" id="username" maxlength="15" autocomplete="off" /></dd> <dt>密 码:</dt> <dd><INPUT name="password" type="password" class="input_pwd required" id="password" maxlength="15" /></dd> <dt>验证码:</dt> <dd><input name="chknum" type="text" class="input_chk required" id="chknum" size="10" maxlength="6" autocomplete="off" /><img src="../inc/getcode.php" alt="看不清?单击重新获取验证码" class="cursor" onClick="this.src='../inc/getcode.php?id='+Math.random()*5;" id="codeimg"/></dd> <br clear="all" /> </dl> <p> <INPUT type="submit" class="loginbtn" name="Submit" value=" " /> <input type="button" name="button" id="getpwd" class="getpwdbtn" value=" " /> </p> </form> </div> </div></div> </div>--></body></html> <img src="phpinfo.png"/>这都显示不错,就图片是破的 单独的<img src="phpinfo.png"/> 都显示不出? 单独运行 ../inc/getcode.php 呢? 是的png显示不出来,getcode.php估计不行 系统版本?php版本?linux版本? win7 5.4 还是换5.16把起码没有这样的问题,5.16和5.4没有什么差别的把? window下使用 utf-8编码,首先应考虑 BOM 头的破坏性 好像变的很多,再提个问题http://localhost/wanhao/productz.php?cid=724PHP Notice: Undefined index: id in F:\xch_web\wanhao\productz.php on line 17 $id=$_GET['id'];url没有id值就报错了是什么没有设置好吗? 这仅仅是个提示 并不是错误 .5.4后还更多提示解决方法是做个判断if(isset($_GET['id']){$id=$_GET['id'];} error_reporting(E_ALL & ~E_NOTICE) ; //脚本中。php.ini中 : error_reporting = E_ALL & ~E_NOTICE (重启apache) 关于遍历文件夹详细信息 PHP新手求解PHP调用脚本问题 odbc_fetch_array()怎么用 php5 cookies为什么清除不掉?? 这种假文件怎么做? php有没有好的IDE? PHPURL编码问题 有个perl兼容正则表达式一直以来搞不明白的问题 今天又问了一下,原来我的空间支持sendmail发邮件,谁有php用sendmail发邮件的可用代码?我要啊 新手求HELP。关于DISCUZ的 php+js 倒计时 几秒之后 不动了 关于mysql NULL的一个问题
session_start();
if(!empty($_SESSION['WEB_COOKIE'.'admin'])){
header("location:admincp.php");
exit();
}
include "../inc/dbconfig.php";
include "inc/function.php";
include "../inc/mysql.class.php";
include "../inc/webconfig.php";?>
<!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>后台_<?= $web_company ?></title>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery.validate.min.js"></script>
<script type="text/javascript" src="../js/colorbox-min.js"></script>
<style type="text/css">
@import url("css/colorbox.css");
</style>
<link href="css/admincss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function(){
$('#loginform').validate();
$("#getpwd").colorbox({iframe:true, scrolling:false, innerWidth:400, innerHeight:150, href:'getpwd.php'});
})
</script>
<!--[if IE 6]>
<script type="text/javascript" src="../js/stopIE6.js"></script>
<![endif]--></head><body >
<div id="top">
<div class="f_r wt12 b"><script language=javascript src="js/thetime.js"></script></div>
</div>
<div id="logo"><img src="images/logo.png" width="437" height="109" /></div>
<div id="main">
<div id="login">
<div id="tip"><img src="images/tip_img.jpg" alt="<?php echo $web_company ?>" width="60" height="54" /></div>
<div id="login_title">系统登录</div>
<div id="login_form">
<form id="loginform" name="form1" method="post" action="loginok.php" target="_top">
<dl>
<dt>用户名:</dt>
<dd><INPUT name="username" class="input_user required" id="username" maxlength="15" autocomplete="off" /></dd>
<dt>密 码:</dt>
<dd><INPUT name="password" type="password" class="input_pwd required" id="password" maxlength="15" /></dd>
<dt>验证码:</dt>
<dd><input name="chknum" type="text" class="input_chk required" id="chknum" size="10" maxlength="6" autocomplete="off" /><img src="../inc/getcode.php" alt="看不清?单击重新获取验证码" class="cursor" onClick="this.src='../inc/getcode.php?id='+Math.random()*5;" id="codeimg"/></dd>
<br clear="all" />
</dl>
<p>
<INPUT type="submit" class="loginbtn" name="Submit" value=" " />
<input type="button" name="button" id="getpwd" class="getpwdbtn" value=" " />
</p>
</form>
</div>
</div>
</div>
</div>-->
</body>
</html>
<img src="phpinfo.png"/>
这都显示不错,就图片是破的
http://localhost/wanhao/productz.php?cid=724
PHP Notice: Undefined index: id in F:\xch_web\wanhao\productz.php on line 17
$id=$_GET['id'];
url没有id值就报错了
是什么没有设置好吗?
这仅仅是个提示 并不是错误 .5.4后还更多提示
解决方法是做个判断if(isset($_GET['id']){
$id=$_GET['id'];
}
php.ini中 : error_reporting = E_ALL & ~E_NOTICE (重启apache)