原程序是在xp iis 下做的  传到测试服务器上是 win2003 iis 下没有问题
现在换到linux  Apache  下上传图片 就上传不了 验证码也不显示了
因为我是个半吊子  实在不知道原因  各位大大知道的给我说一下
谢谢啊!!

解决方案 »

  1.   

    php跨平台的那你贴代码看看…这样子也说不出什么…,显示验证码的部分
      

  2.   

    <?php
    session_start(); 

    // generate 5 digit random number
    $rand = rand(1000, 9999);

    // create the hash for the random number and put it in the session
    $_SESSION['image_random_value'] = md5($rand);

    // create the image(width,height)
    $image = imagecreate(45, 22);

    // use white as the background image
    $bgColor = imagecolorallocate ($image, 255, 255, 255);

    // the text color is black
    $textColor = imagecolorallocate ($image, 0, 0, 0); 

    // write the random number
    imagestring ($image, 5, 5, 3, $rand, $textColor); 

    // send several headers to make sure the image is not cached 
    // taken directly from the PHP Manual

    // Date in the past 
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 

    // always modified 
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 

    // HTTP/1.1 
    header("Cache-Control: no-store, no-cache, must-revalidate"); 
    header("Cache-Control: post-check=0, pre-check=0", false); 

    // HTTP/1.0 
    header("Pragma: no-cache"); 


    // send the content type header so the image is displayed properly
    header('Content-type: image/jpeg');

    // send the image to the browser
    imagejpeg($image);

    // destroy the image to free up the memory
    imagedestroy($image);
    ?>这个是生成验证码部分的代码
    <img src="common/gif.php">
    这个是调用 这个文件的地方的代码
      

  3.   

    http://www.cooperelate.com/
    现在验证码被注释掉了。
      

  4.   

    http://www.cooperelate.com/common/gif.php //这个文件也没了啊……看不到状况
      

  5.   

    http://www.cooperelate.com/bg/common/gif.php
      

  6.   

     Call to undefined function imagecreate()……
    imagecreate没定义,GD库不支持吧?
      

  7.   

    自己看看吧Fatal error: Call to undefined function imagecreate() in /usr/local/apache2/htdocs/bg/common/gif.php on line 11这是你的错误
      

  8.   

    嗯   我先让服务器那边解决这个问题
    如果还有问题的话我会在这个帖子  我会给帖子加分的 谢谢   amani11 和 kyzy_yy_pm  的帮忙