0

重複の可能性:
PHP の「警告: ヘッダーは既に送信されています」

クラス内の別の存在に送信するヘッダーがいくつかあるためだと思います。とのように見えますか?それは私を送り返すことを気にしないので '. それを行うためのJavaScriptまたはjqueryしかないのだろうか。

しかしob_start();を使ってもやれと言ったのにわざわざやらないなんて信じられない。および ob_end_flush ();。面倒なので、まだうまくいきません..

これが私がこの建物を建てた方法ですが、戻ってきて、気にしなかったと言います。

警告: ヘッダー情報を変更できません - 404 行目の /home/jesperbo/public_html/mebe/function/function.php で既に送信されたヘッダー (/home/jesperbo/public_html/mebe/function/function.php:479 で開始された出力)

 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();
?>

あなたが私を助けてくれることを願っていますか?

4

0 に答える 0