想想简单的个人资料页面。用户必须编辑。所以,我创建了基本的 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()功能,但我在简单的配置文件编辑页面中看不到错误..
感谢您的关注。干得好..