标题 - 送我回去

时间:2012-11-15 14:02:34

标签: php javascript jquery mysqli

  

可能重复:
  “Warning: Headers already sent” in PHP

我在想这可能是因为我有几个标题发送到我班上的另一个。看起来像?因为它不打扰送我回去'。想知道你是否只有一些javascript或jquery才能做到这一点?。

但令人难以置信的是,即使我已经告诉它即使我使用ob_start(),它也不会费心去做。和ob_end_flush();.这太麻烦了,仍然没有成功..

这就是我建造这座建筑的方法,但它又回来了,说它没有因为这个而烦恼:

警告:无法修改标题信息 - 已经发送的标题(/home/jesperbo/public_html/mebe/function/function.php:479上的输出开始)/home/jesperbo/public_html/mebe/function/function.php在404行

 function img_ok_upload(){
        if($_SESSION["logged_in"] = true && $_SESSION["rank"] == 1 || $_SESSION["rank"] == 2)
        {
            include "function/class.upload.php";
            $handle = new Upload($_FILES["filename"]);

            if($handle->uploaded)
            {
                //lidt mere store billeder
                $handle->image_resize = true;
                $handle->image_ratio_y = true;
                $handle->image_x = 220;
                $handle->Process("gallery/store");

                //til profil billede lign..
                $handle->image_resize = true;
                $handle->image_ratio_crop = true;
                $handle->image_y = 115;
                $handle->image_x = 100;
                $handle->Process("gallery");

                //til profil billede lign..
                $handle->image_resize = true;
                $handle->image_ratio_crop = true;
                $handle->image_y = 75;
                $handle->image_x = 75;
                $handle->Process("gallery/lille");
                $pb = $handle->file_dst_name;

            }
            if ($stmt = $this->mysqli->prepare('INSERT INTO `gallery` (`title`, `id_bruger`) VALUES (?, ?)'))
            {

                $stmt->bind_param('si', $title, $id_bruger);
                $title = $pb;
                $id_bruger = $_SESSION["id"];

                $stmt->execute();
                $stmt->close();

                header('Location: /nyeste-billeder/');

            }
        }
    }

所以它检索页面的整个代码就在这里;

<?php 
session_start();
require_once ("function/function.php");
$mebe = new mebe;
$db = $mebe->db_c();
ob_start();

$img_ok_upload = $mebe->img_ok_upload();

ob_end_flush();
?>

希望你能帮助我吗?

0 个答案:

没有答案