ForumNeuro


Geri Git   ForumNeuro > Bilgisayar Dünyası > Webmaster
Kayıt S.S.S Üye Listesi Ajanda Konuları Okundu İşaretle

Webmaster Web Dizayn ve Webmasterlarla ilgili herşey burada...


Yanıtla
 
Forum Araçları Görüntüleme Biçimleri
Eski 02-01-2006, 20:45   #1 (permalink)
NoDRaC
Etkisiz Üye
 
Giriş Tarihi: 22-11-2005
Mesajlar: 0
Rep Gücü: 0
Rep Puanı : 47
NoDRaC Yavaş ama emin adımlarla geliyorum
Exclamation Resim Upload Scripti

Arkdaşlar kendime resim upload yapmak amacıyla bir script arıyorum resim.forumneuro.com scriptide olabilir umarım yardımcı olursunuz
NoDRaC is offline   Alıntı Yaparak Cevapla
Eski 05-01-2006, 15:56   #2 (permalink)
sertay
Etkisiz Üye
 
Giriş Tarihi: 20-09-2005
Mesajlar: 2
Rep Gücü: 3
Rep Puanı : 10
sertay Yavaş ama emin adımlarla geliyorum
Varsayılan Resİm YÜkleme

Merhabalar,
Not: Aşağıdaki işlemlerin çalışabilmesi için serverda dizine yazma izninin olması gerekir.

İlk olarak resim.asp adlı bir dosya yarat. Aşağıdakilerini içerisine yapıştır.

resim.asp
<html>
<head>
<title> Resim Yükleme </title>

</head>
<body>
<div align="center">
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" align="left">
<form ENCTYPE="multipart/form-data" ACTION="resimyukle.asp" METHOD="POST">
Dosya adı...:<br>
<input NAME="dosya" TYPE="file">
<br>
<br>
<input type="submit" value="** Yükle **">
</form>
</td>
</tr>
</table>

</div>
</body>
</html>

ikinci olarak resimyukle.asp dosyası hazırla ve içerisine aşağıdakilerini yapıştır

resimyukle.asp
<%
Set Yukle = New DosyaYukleme
' buraya istedigin klasoru yaz.
Yol = Server.MapPath("..\dosya" )&"\"
DosyaIsmi = Yukle.FileName("dosya" )
tamyol = "../dosya/"+sifre1
dosyauzantisi = Right(Yukle.FileName("dosya"),3)

If DosyaIsmi = "" Then
Response.Write ("Yüklenecek dosyayı seçmediniz.")
Response.End
End if
If not dosyauzantisi = "jpg" Then
Response.Write (Yukle.FileName("dosya" )) & " Resim dosyası değildir"
Response.End
End if
If dosyauzantisi = "jpg" and Request.TotalBytes > 50000 Then
Response.Write (Yukle.FileName("dosya" )) & " dosyası 50Kb dan büyüktür"
Response.End
End if
If dosyauzantisi = "jpg" and Request.TotalBytes < 50001 Then

Set FSO = Server.CreateObject("Scripting.FileSystemObject" )
Set YeniDosya = FSO.CreateTextFile(Yol & DosyaIsmi)

For i = 1 To LenB(Yukle.Value("dosya"))
YeniDosya.Write Chr(AscB(MidB(Yukle.Value("dosya"), i, 1)))
Next
YeniDosya.Close
Set YeniDosya = Nothing
Set FSO = Nothing
Set Yukle = Nothing
End If
%>
<body>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1">YÜKLEME TAMAMLANDI</font>

<%
' burada yuklenen dosyanın adını database e kayıt edebilirsin.
%>

<%
Class DosyaYukleme

Private pvObjUploadRequest

Private Sub Class_Initialize
Dim RequestBin, Boundary, Value
Dim lngPosBegin, lngPosEnd, lngBoundaryPos
Dim lngPos, lngPosFile, lngPosBound
Dim strName, strFileName, strContentType
Dim objUploadControl

Set pvObjUploadRequest = Server.CreateObject("Scripting.Dictionary" )


RequestBin = Request.BinaryRead(Request.TotalBytes)


lngPosBegin = 1
lngPosEnd = InStrB(lngPosBegin, RequestBin, GetByteString(Chr(13)))
Boundary = MidB(RequestBin, lngPosBegin, lngPosEnd - lngPosBegin)
lngBoundaryPos = InstrB(1, RequestBin, Boundary)


Do Until (lngBoundaryPos = InstrB(RequestBin, Boundary & getByteString("--" )))

Set objUploadControl = CreateObject("Scripting.Dictionary" )


lngPos = InstrB(lngBoundaryPos, RequestBin, GetByteString("Content-Disposition" ))
lngPos = InstrB(lngPos, RequestBin, GetByteString("name=" ))
lngPosBegin = lngPos + 6
lngPosEnd = InstrB(lngPosBegin, RequestBin, GetByteString(Chr(34)))
strName = LCase(GetString(MidB(RequestBin, lngPosBegin, lngPosEnd - lngPosBegin)))
lngPosFile = InstrB(lngBoundaryPos, RequestBin, GetByteString("filename=" ))
lngPosBound = InstrB(lngPosEnd, RequestBin, Boundary)


If lngPosFile <> 0 And lngPosFile < lngPosBound Then

lngPosBegin = lngPosFile + 10
lngPosEnd = InStrB(lngPosBegin, RequestBin, GetByteString(Chr(34)))
strFileName = GetString(MidB(RequestBin, lngPosBegin, lngPosEnd - lngPosBegin))


objUploadControl.Add "FileName" , strFileName
lngPos = InStrB(lngPosEnd, RequestBin, GetByteString("Content-Type:" ))
lngPosBegin = lngPos + 14
lngPosEnd = InStrB(lngPosBegin, RequestBin, GetByteString(Chr(13)))


strContentType = GetString(MidB(RequestBin, lngPosBegin, lngPosEnd - lngPosBegin))
objUploadControl.Add "ContentType" , strContentType

lngPosBegin = lngPosEnd + 4
lngPosEnd = InstrB(lngPosBegin, RequestBin, Boundary) - 2
Value = MidB(RequestBin, lngPosBegin, lngPosEnd - lngPosBegin)
Else

lngPos = InstrB(lngPos, RequestBin, GetByteString(Chr(13)))
lngPosBegin = lngPos + 4
lngPosEnd = InStrB(lngPosBegin, RequestBin, Boundary) - 2
Value = GetString(MidB(RequestBin, lngPosBegin, lngPosEnd - lngPosBegin))
End If


objUploadControl.Add "Value" , Value


pvObjUploadRequest.Add strName, objUploadControl


lngBoundaryPos = InStrB(lngBoundaryPos + LenB(Boundary), RequestBin, Boundary)
Loop
End Sub


Private Sub Class_Terminate
Dim objDictionary
For Each objDictionary In pvObjUploadRequest.Items
objDictionary.RemoveAll
Set objDictionary = Nothing
Next
pvObjUploadRequest.RemoveAll
Set pvObjUploadRequest = Nothing
End Sub


Private Function GetByteString(strString)
Dim Char
Dim i

For i = 1 To Len(strString)
Char = Mid(strString, i , 1)
GetByteString = GetByteString & ChrB(AscB(Char))
Next
End Function


Private Function GetString(strBin)
Dim intCount

GetString = ""

For intCount = 1 To LenB(strBin)
GetString = GetString & Chr(AscB(MidB(strBin, intCount, 1)))
Next
End Function


Public Function Value(Name)
Name = LCase(Name)
If pvObjUploadRequest.Exists(Name) Then
Value = pvObjUploadRequest.Item(Name).Item("Value" )
Else
Value = Empty
End If
End Function


Public Function ContentType(Name)
Name = LCase(Name)
If pvObjUploadRequest.Exists(Name) Then
If pvObjUploadRequest.Item(Name).Exists("ContentType" ) Then
ContentType = pvObjUploadRequest.Item(Name).Item("ContentType" )
Else
ContentType = Empty
End If
Else
ContentType = Empty
End If

End Function


Public Function FileNamePath(Name)
Name = LCase(Name)
If pvObjUploadRequest.Exists(Name) Then
If pvObjUploadRequest.Item(Name).Exists("FileName" ) Then
FileNamePath = pvObjUploadRequest.Item(Name).Item("FileName" )
Else
FileNamePath = Empty
End If
Else
FileNamePath = Empty
End If
End Function


Public Function FileName(Name)
Dim strFileName

Name = LCase(Name)
If pvObjUploadRequest.Exists(Name) Then
If pvObjUploadRequest.Item(Name).Exists("FileName" ) Then
strFileName = pvObjUploadRequest.Item(Name).Item("FileName" )
FileName = Right(strFileName, Len(strFileName) - InStrRev(strFileName, "\" ))
Else
FileName = Empty
End If
Else
FileName = Empty
End If
End Function

End Class
%>
sertay is offline   Alıntı Yaparak Cevapla
Eski 09-11-2007, 16:06   #3 (permalink)
by_seyfo
Uzman Çavuş
 
Giriş Tarihi: 08-08-2007
Mesajlar: 63
Rep Gücü: 2
Rep Puanı : 10
by_seyfo Yavaş ama emin adımlarla geliyorum
Varsayılan

hata veriyo dosyayı yüklerken S:
__________________
kula bela gelmez hak yazmadıkca hak bela yazmaz kul azmadıkca
by_seyfo is offline   Alıntı Yaparak Cevapla
Eski 10-11-2007, 11:29   #4 (permalink)
кє๓คlเภ_ครкєгเ
Teğmen
 
кє๓คlเภ_ครкєгเ's Avatar
 
Giriş Tarihi: 11-02-2007
Konum: Republic Of Fenerbahçe
Mesajlar: 428
Rep Gücü: 182
Rep Puanı : 44817
кє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımazкє๓คlเภ_ครкєгเ Beni kesseler acımaz
Varsayılan

Alıntı:
by_seyfo tarafından gönderildi Mesajı Görüntüle
hata veriyo dosyayı yüklerken S:

kardeş sanırım bu kodlar asp sistemleri için.Seninkide php olduğu için hata veriyor.
__________________



Türk milletinin karakter ve adetlerine en uygun olan idare, cumhuriyet idaresidir.



кє๓คlเภ_ครкєгเ is offline   Alıntı Yaparak Cevapla
Yanıtla


Forum Araçları
Görüntüleme Biçimleri

Gönderme Kuralları
Yeni konular açabilirsiniz --> izin yok
Yanıtlar gönderebilirsiniz --> izin yok
Eklentiler gönderebilirsiniz --> izin yok
Mesajlarınızı düzenleyebilirsiniz --> izin yok

vB koduAçık
SimgelerAçık
[IMG] kodu Açık
HTML kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Kapalı
Refbacks are Kapalı


Saat 07:20.

Porno

Powered by vB 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by 3.0.0
Tercüme Eden: ReSSaM

Reklam Vermek için ressam@gmail.com Adresine e-mail gönderiniz

For Advertising contact ressam@gmail.com




Şarkı Sözleri sohbet Forum
haber dizi izle dizi
1 2 4 5 6 7 8 10 11 12 13 14 15 16 22 23 24 25 29 30 31 32 33 34 35 36 37 38 39 44 45 46 47 48 50 51 52 53 54 59 66 70 77 78 83 84 85 86 87 88 89 90 91 92 94 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 115 116 119 120 124 125 126 127 128 130 131 132 133 134 135 136 137 138 140 141 143 144 145 146 147 148 149 150 151 152 153 154 159 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 240 249 250 251 253 256 257 260 267 268 269 270 272 273 274 275 277 278 279 280 281 283 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 306 307 309 310 312 313 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 346 347 348 349 351 352 353 354 356 357 358 359 360 361 362 363 364 365 366 367 369 370 371 372 373 374 402 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489