gpt4 book ai didi

php - MySQL:更新(不上传图像)

转载 作者:行者123 更新时间:2023-11-30 01:19:50 25 4
gpt4 key购买 nike

想想简单的个人资料页面。用户必须编辑。所以,我创建了基本的 php 页面。但是,它不上传图像。为什么不上传?我不明白。

<?php       

if((array_key_exists("degistir",$_GET) && $_GET['degistir'] == "dogru") && (array_key_exists('uyeId',$_GET) && $_GET['uyeId'] == md5(@$_SESSION['uyeGiris_skype'])))
{
if(isset($_POST['duzenlemeBitir']))
{
$uyeUrl_ = "inc/imj/uye/".$_SESSION['uyeGiris_skype'];
if(!is_dir($uyeUrl_)){mkdir($uyeUrl_);
$profilResim = $uyeUrl."/".$FILES['profilResim']['name'];
move_uploaded_file($_FILES['profilResim']['tmp_name'],$profilResim) or die(mysql_error());
$galeri = array();

for($s=1; $s<9; $s++)
{
$uyeUrlLink = $uyeUrl_."/".$_FILES['galeri'.$s]['name'];
$uyeUrlAdi = $_FILES['galeri'.$s]['name'];
move_uploaded_file($_FILES['galeri'.$s]['tmp_name'],$uyeUrlLink) or die(mysql_error());
$galeri[$s] = $uyeUrlLink;
}

if(!isset($_FILES['profilResim']['value']))
{
$_FILES['profilResim']['value'] = $uyeDetay['profilResim'];
}
if(!isset($_FILES['galeri1']['value']))
{
$_FILES['galeri1']['value'] = $uyeDetay['galeri1'];
}
if(!isset($_FILES['galeri2']['value']))
{
$_FILES['galeri2']['value'] = $uyeDetay['galeri2'];
}
if(!isset($_FILES['galeri3']['value']))
{
$_FILES['galeri3']['value'] = $uyeDetay['galeri3'];
}
if(!isset($_FILES['galeri4']['value']))
{
$_FILES['galeri4']['value'] = $uyeDetay['galeri4'];
}
if(!isset($_FILES['galeri5']['value']))
{
$_FILES['galeri5']['value'] = $uyeDetay['galeri5'];
}
if(!isset($_FILES['galeri6']['value']))
{
$_FILES['galeri6']['value'] = $uyeDetay['galeri6'];
}
if(!isset($_FILES['galeri7']['value']))
{
$_FILES['galeri7']['value'] = $uyeDetay['galeri7'];
}
if(!isset($_FILES['galeri8']['value']))
{
$_FILES['galeri8']['value'] = $uyeDetay['galeri8'];
}
$ekle = mysql_query("UPDATE uye SET skype='".$_POST['skype']."', msn='".$_POST['msn']."', facebook='".$_POST['facebook']."', yas='".$_POST['yas']."', boy='".$_POST['boy']."', kilo='".$_POST['kilo']."', hakkinda='".$_POST['hakkinda']."', profil_resim='".$profilResim."', galeri_1='".$galeri[1]."', galeri_2='".$galeri[2]."', galeri_3='".$galeri[3]."', galeri_4='".$galeri[4]."', galeri_5='".$galeri[5]."', galeri_6='".$galeri[6]."', galeri_7='".$galeri[7]."', galeri_8='".$galeri[8]."' WHERE e_posta = '".$_SESSION['uyeGiris_ePosta']."' AND sifre='".$_SESSION['uyeGiris_sifre']."'") or die(mysql_error());

}
}
?>

注意:这段代码有mysql_error()函数,但我在简单的配置文件编辑页面看不到错误。

感谢您的关注。好作品..

最佳答案

书写错误..

$uyeUrl = blabla..

if(!is_dir($uyeUrl_)){mkdir($uyeUrl_);}$profilResim = $uyeUrl_."/".$FILES['profilResim']['name'];

关于php - MySQL:更新(不上传图像),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18675671/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com