Autor Beitrag
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 17.08.11 19:23 
Also wenn du nicht fähig bist, das in beiden Videos gezeigte zu kombinieren oder selbst etwas nachzulesen, dann mach doch einfach einen Thread in der Job Börse oder warte solange bis sich jemand erbarmt. :roll:

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 19:26 
Wie war das nochmal mit dem warten bis sich jemand erbamt ;) ^^
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 17.08.11 19:27 
Viel Glück, ich glaube nicht, dass es hier jemand umsonst macht. :D

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 19:28 
Nee, nur das Problem ist er lässt die daten in ein Ordner laden ich will es per e-mail zugeschickt bekommen
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 17.08.11 19:34 
Die können dann ja auch verschickt werden, zunächst müssen sie in diesem Fall aber hochgeladen werden, das steht aber auch schon alles in dem ersten Link den ich gepostet habe.
Du hast doch nichts davon gelesen oder? :roll:

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 19:38 
Ich will aber das die dirket verschickt werden .,.
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 17.08.11 19:41 
Es muss aber in jedem Fall ein Upload getätigt werden, da PHP nun mal serverseitig läuft.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 19:45 
Hmmm bist du dir da sicher
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 19:46 
Naja und ich es hochgeladen habe wie mach ma das mit der e-mail
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 17.08.11 19:47 
Zum letzten mal, das steht doch hier: www.php-einfach.de/codeschnipsel_1114.php

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 19:50 
Achso okkk danke
(Ein tutorial ist trotzdem besser) ;)
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 17.08.11 20:20 
Das ist eins, man muss nur lesen können. ;)

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mi 17.08.11 22:10 
Naja dann muss ich wohl oder übel lesen lernen ;)
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Sa 20.08.11 13:16 
Hallo, kann mir jemand sagen wo ich hier im code die Bilder- Formate festlegen kann?


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
<?php
$dateityp = GetImageSize($_FILES['datei']['tmp_name']);
if($dateityp[2] != 0)
   {

   if($_FILES['datei']['size'] <  102400)
      {
      move_uploaded_file($_FILES['datei']['tmp_name'], "upload/".$_FILES['datei']['name']);
      echo "Das Bild wurde Erfolgreich nach upload/".$_FILES['datei']['name']." hochgeladen";
      }

   else
      {
         echo "Das Bild darf nicht größer als 100 kb sein ";
      }

    }

else
    {
    echo "Bitte nur Bilder im Gif bzw. jpg Format hochladen";
    }
?>


Danke im voraus
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: So 21.08.11 11:08 
Hatt den niemand eine antwort ;( :opps: :(
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 21.08.11 12:01 
PHP kommt mit einem (inzwischen) recht guten Manual. Und ich dachte, du wolltest mal lesen lernen ;-) Zumal das ja im Code steht ;-) (Auch wenn ich den so nicht stehen lassen würde, weil der nur die Hälfte der für ein sicheres Upload-Script nötigen Abfragen macht). Von der XSS-Lücke in Zeile 9 mal gar nicht zu sprechen. Und das Directory Traversal in Zeile 8 hat auch was Nettes :P

BTW: Zeile 3 --> RTFM --> Lösung.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.

Für diesen Beitrag haben gedankt: storestore
mandras
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 429
Erhaltene Danke: 107

Win 10
Delphi 6 Prof, Delphi 10.4 Prof
BeitragVerfasst: So 21.08.11 12:04 
über
$_FILES["datei"]["type"];
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 21.08.11 12:10 
user profile iconmandras hat folgendes geschrieben Zum zitierten Posting springen:
über
$_FILES["datei"]["type"];

Ja und nein :P

Ja, da steht was drin, was wie ein Dateityp aussieht.
Nein: Das Feld steht unter Kontrolle des Users und kann damit einfach missbraucht werden.

Die Upload-Info kann also maximal als Indiz genutzt werden (wobei ich die aus Prinzip verwerfe, eben WEIL sie unter Kontrolle des Nutzers steht).

Die richtige Lösung hab ich oben bereits angedeutet; Lesen hilft hier wirklich.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.

Für diesen Beitrag haben gedankt: storestore
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: So 21.08.11 13:54 
Ohh, ähh hmmm das ist jetzt peinlich. Ich habe die Seite www.php-einfach.de/codeschnipsel_1114.php nochmal geöffnet und endeckt das die mail funktion doch drin steht.
Sorry habe ich aber nicht gesehen gehabt. Ich habe am anfang nur darauf geschaut [url] www.php-einfach.de/t...tei_upload.php[/url]
storestore
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 397
Erhaltene Danke: 7

WIN 7
C#
BeitragVerfasst: Mo 22.08.11 14:49 
Tut mir leid aber ich brauche nochmal Hilfe.
Er zeigt mir an das hier ein Syntaxfehler in Zeile 6 ist. Denn finde ich leider nicht! Würde der code (wenn der Syntaxfehler behoben ist) eig. funktionieren?

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
<?php
        if(isset($_FILES['upload'])){
         $allowed_exts = array('jpg','jpeg', 'png', 'gif', 'bmp');
         $ext = substr($_FILES['upload']['name'], strrpos('.', $_FILES['upload']['name']);
     
   }
     
   }
$text=$_FILES['datei']['name'];
// Umlaute entfernen
$umlaute = Array("/ä/","/ö/","/ü/","/Ä/","/Ö/","/Ü/","/ß/");
$replace = Array("ae","oe","ue","Ae","Oe","Ue","ss");
$text_neu = preg_replace($umlaute, $replace, $text);

// Dateiname wird erstellt
$text = $text_neu; 
$datname=time();
$datname.=$text;


   if($_FILES['datei']['size'] <  4096000)
      {
       if ( move_uploaded_file($_FILES['datei']['tmp_name'], "bilder/".$datname) ) {
        echo "Das Bild wurde Erfolgreich nach bilder/$datname hochgeladen";

      }

   else
      {
         echo "Das Bild darf nicht größer als 4 MB sein ";
      }

    }

else
    {
    echo "Bitte nur Bilder im Gif bzw. jpg Format hochladen";
    }


   }
}
 echo "Das Bild wurde Erfolgreich nach bilder/$datname hochgeladen";


if ( mail("storestore@web.de", "Betreff", "name", "From: $Email")){
echo "Die Mail wurde erfolgreich gesendet";
}
?>
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.