第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

上傳到數(shù)據(jù)庫的圖片路徑?jīng)]有斜杠,怎么辦?

上傳到數(shù)據(jù)庫的圖片路徑?jīng)]有斜杠,怎么辦?

zhang1iang 2018-03-28 16:24:00
<form action="" method="POST">?? ??? ??? ??? ??? ??? ?<div class="col-md-6 wthree_contact_left_grid">?? ??? ??? ??? ??? ??? ??? ?<input type="text" name="name" value="Name*" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Name*';}" required>??????????????????????????? <input type="text" name="subject" value="Subject*" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Subject*';}" required>?? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ?<div class="col-md-6 wthree_contact_left_grid">?? ??? ??? ??? ??? ??? ??? ?<input type="text" name="phone" value="Telephone*" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Telephone*';}" required> ????????????????????????????? <input style="margin-top:20px;padding:4px;" name="image" type="file" accept="image/gif, image/jpeg"/>?? ??? ??? ??? ??? ??? ?</div>?? ??? ??? ??? ??? ??? ?<div class="clearfix"> </div>?? ??? ??? ??? ??? ??? ?<textarea? style="height:4px;" name="ms" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message...';}" required>物品描述...</textarea>?? ??? ??? ??? ??? ??? ?<input style="width:97%;" type="submit" name="submit" value="發(fā)布" >?? ??? ??? ??? ??? ?</form>?<?php??? ??? ? if(isset($_POST['submit'])){?? ??? ??? ?//$username=$_POST['username'];?? ??? ??? ?$name = $_POST['name'];?? ??? ??? ?$subject = $_POST['subject'];?? ??? ??? ?$phone = $_POST['phone'];?? ??? ??? ?$image = $_POST['image'];?? ??? ??? ?$ms = $_POST['ms'];??? ??? ??? ?if($_FILE["image"]["error"])?? ??? ??? ?{? ?? ??? ??? ??? ?echo $_FILE["image"]["error"];?? ??? ??? ?}else{??? ??? ??? ?if(($_FILE["image"]["type"]=="image/jpeg" || $_FILE["image"]["type"]=="image/jpg")&& $_FILE["image"]["size"]<1024000)? ?? ??? ??? ?{? ??? ??? ??? ? $image = "photo/".date("YmdHis").$_FILE["image"]["name"];? //圖片存儲(chǔ)的路徑??? ??? ??? ??? ?$filename = iconv("UTF-8","gb2312",$image);??? ??? ??? ??? ?if(file_exists($filename))? ??? ??? ??? ? {??? ??? ??? ? ?? ?echo "<script>alert('該文件已存在!');</script>";? ??? ??? ? ?? ? }else{?? ??? ??? ?//包含數(shù)據(jù)庫連接文件?? ??? ??? ?include('conn.php');???? ??? ??? ??? ??? ??? ?//檢測(cè)用戶名是否已經(jīng)存在?? ??? ??? ?/*$check_query = mysql_query("select * from userinfo where username='$username' ");?? ??? ??? ?$rs = mysql_fetch_array($check_query);//獲得結(jié)果集?? ??? ??? ?if($rs['username']==1)??? ??? ??? ?{??? ??? ??? ??? ?echo "<script language='javascript'> alert('禁止訪問!'); location.href= 'index.php'; </script>"; ?? ??? ??? ??? ?exit;?? ??? ??? ?}?? ??? ??? ?else{*/?? ??? ??? ??? ?//寫入數(shù)據(jù)?? ??? ??? ??? ?$sql = "INSERT INTO mail(name, subject, phone, image,ms)VALUES('$name', '$subject', $phone, '$filename', '$ms')";?? ??? ??? ??? ?if(mysql_query($sql,$conn)){?? ??? ??? ??? ??? ?exit('用戶發(fā)布成功!點(diǎn)擊此處 <a href="event.php">詳情</a>');?? ??? ??? ??? ?} else {?? ??? ??? ??? ??? ?echo '抱歉!發(fā)布失敗:',mysql_error(),'<br />';?? ??? ??? ??? ??? ?echo '點(diǎn)擊此處.<a href="javascript:history.back(-1);">返回</a> 重試';?? ??? ??? ??? ?}?? ??? ??? ?}?? ??? ??? ??? ?}??? ? }?? ?}?>
查看完整描述

1 回答

?
晚安sp

TA貢獻(xiàn)405條經(jīng)驗(yàn) 獲得超154個(gè)贊

轉(zhuǎn)譯下

查看完整回答
反對(duì) 回復(fù) 2018-03-28
  • 1 回答
  • 0 關(guān)注
  • 1484 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)