Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Attachment fehler

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
halloweb
Smarty Regular


Joined: 23 Nov 2004
Posts: 35

PostPosted: Tue Nov 30, 2004 5:09 pm    Post subject: Attachment fehler Reply with quote

Weiss einer hier weiter !

Emails versenden mit Atachments funktioniert aber ohne Attachment bekomme ich folgende Fehlermeldung !

index.php
Code:
$zeiger_auf_datei=fopen($datei[$i],"rb");
$inhalt_der_datei=fread($zeiger_auf_datei,filesize($datei[$i]));
fclose($zeiger_auf_datei);


Fehlermeldung:
Code:
<b>Warning</b>:  filesize() [<a href='http://www.php.net/function.filesize'>function.filesize</a>]: Stat failed for  (errno=2 - No such file or directory) in <b>/srv/www/htdocs/web78/html/demo/mail.php</b> on line <b>48</b><br />
<br />
<b>Warning</b>:  fread(): supplied argument is not a valid stream resource in <b>/srv/www/htdocs/web78/html/demo/mail.php</b> on line <b>48</b><br />
<br />
<b>Warning</b>:  fclose(): supplied argument is not a valid stream resource in <b>/srv/www/htdocs/web78/html/demo/mail.php</b> on line <b>49</b><br />


Hier gebe ich doch
Code:
for($i=0;$i<count($datei);$i++)
0 vor !

Die Fehlermeldung sagt aus das die Datei nicht gefunden wurde !
Wie muss ich das Script umschreiben, dass wenn kein Attachment mitgesendet wird die Fehlermeldung nicht kommt ?

________
vaporizer manufacturer

Last edited by halloweb on Wed Feb 02, 2011 7:07 pm; edited 2 times in total
Back to top
View user's profile Send private message
T.
Smarty Regular


Joined: 22 Aug 2004
Posts: 69
Location: AT

PostPosted: Tue Nov 30, 2004 7:10 pm    Post subject: Reply with quote

schon mal geschaut, was in count($datei) drinnsteht?
_________________
Oppossom - Heavy rock from austria
Back to top
View user's profile Send private message Visit poster's website
halloweb
Smarty Regular


Joined: 23 Nov 2004
Posts: 35

PostPosted: Tue Nov 30, 2004 7:18 pm    Post subject: Reply with quote

Danke Thomas,

ich hab die L?sung gefunden "if( file_Exists"
muss vorher abgefragt werden !

________
CRITICAL ILLNESS INSURANCE FORUMS
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP