画像をサーバーにアップロードするように構築する必要もありますが、続行できないというエラーが表示されるか、何を言うべきですか? うーん
activate.php彼女
<input type="file" name="file" />
activate_updater.php彼女
<?php include ("include/database/db.php");
ini_set('display_errors',1);
error_reporting(E_ALL | E_STRICT);
session_start();
$pb = null;
include("class.upload.php");
$handle = new Upload($_FILES['profilbillede']);
if($handle->uploaded){
//lidt mere store billeder
$handle->image_resize = true;
$handle->image_ratio_y = true;
$handle->image_x = 220;
$handle->Process("profil/store");
//til profil billede lign..
$handle->image_resize = true;
$handle->image_ratio_crop = true;
$handle->image_y = 75;
$handle->image_x = 75;
$handle->Process("profil");
$pb = $handle->file_dst_name;
echo 'Billedet: '.$pb.'<br>';
echo "Dit billede blev upload<br>";
}else{
$pb = 'bruger_intet.png';
}
if($stmt = $mysqli->prepare('UPDATE `brugere` SET `rank`=2, `katogori`=?, `djnavn`=?, `profilbillede`=?, `profiltekst`=?, `facebook`=?, `pris`=?, `booking`=?, `mobil`=? WHERE `code`=?'))
{
$stmt->bind_param('iiiiiiiis', $katogori, $djnavn, $profilbillede, $profiltekst, $facebook, $pris, $booking, $mobil, $g_code);
//fra input ting ting..
$katogori = $_POST["kategori"];
$djnavn = $_POST["djnavn"];
$profilbillede = $_POST["file"];
$profiltekst = $_POST["profiltekst"];
$facebook = $_POST["facebook"];
$pris = $_POST["pris"];
$booking = $_POST["booking"];
$mobil = $_POST["mobil"];
$g_code = $_SESSION["code"];
$stmt->execute();
$stmt->close();
header("Location: http://.....dk/logind/");
}
else
{
echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
}
?>
ここでエラーが発生しますか?
Notice: 未定義のインデックス: ファイル /home/jesperbo/public_html/,,,.dk/activate_updater.php の 37 行目
警告: ヘッダー情報を変更できません - /home/jesperbo/public_html/,,.dk/activate_updater.php 内の (/home/jesperbo/public_html/,,,.dk/activate_updater.php:24 で開始された出力) によって既に送信されたヘッダー48行目
ここで問題が発生します
$profilbillede = $_POST["file"];
そしてここ
echo 'Billedet: '.$pb.'<br>';
そしてここ
header("Location: http://....dk/logind/");