|
 |
|
Upload เช็คชื่อ ช่วยดูโค้ดทีครับ จากโค้ด ให้อัพโหลด (".jpg", ".png", ".bmp"); เท่านั้นใช่ไหมครับ |
|
 |
|
|
 |
 |
|
if (extArray[i] == ext) {
ลองเปลี่ยนเป็น != ดูสิครับ
|
 |
 |
 |
 |
Date :
2009-11-28 19:27:15 |
By :
deawx |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ก็ไม่ได้อ่ะครับ
|
 |
 |
 |
 |
Date :
2009-11-29 13:38:40 |
By :
pea_on |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่ครับ ไม่ได้อ่ะ
|
 |
 |
 |
 |
Date :
2009-11-29 18:13:35 |
By :
pea_on |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Help ทีคราบบบ
|
 |
 |
 |
 |
Date :
2009-11-29 20:53:16 |
By :
pea_on |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<html>
<head>
<title>CaSPeR Upload</title>
<script language="JavaScript">
extArray = new Array(".jpg", ".png", ".bmp");
function LimitAttach(form, file) {
allowSubmit = false; //.................................. เปลี่ยนเป็น = true
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) {
allowSubmit = true; break; //.................เปลี่ยนเป็น = false; break;
}
}
if (allowSubmit) return true;
else
alert("Please only upload files : "+ (extArray.join(" "))); //................ เปลี่ยนเป็น please dont upload ..
return false;
}
</script>
</head>
<body>
<form method="post" action="checkname.php" enctype="multipart/form-data">
<input name="filupload" type="file"><br>
<input type='submit' name='Submit' value='Upload' onclick='return LimitAttach(this.form, this.form.filupload.value)' >
</form>
</body>
</html>
|
 |
 |
 |
 |
Date :
2009-11-29 22:48:07 |
By :
num |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากครับ
|
 |
 |
 |
 |
Date :
2009-11-30 14:36:02 |
By :
pea_on |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|