Nikako ne mogu da posaljem ataachment, osim ako unesem path rucno !
znaci ovako
OVO NE RADI :
<html>
.
.
.
<input type="file" name="Attachment" size="40">
.
.
</html>
<?php
if(isset($_POST['Submit']))
{
. . .
$path =$_POST['Attachment'];
$filename = basename($path);
$encoding = "base64";
$type = "application/octet-stream";
$mail->AddAttachment($path,$filename,$encoding,$type);
}
?>
OVO RADI :
<html>
.
.
.
<input type="file" name="Attachment" size="40">
.
.
</html>
<?php
if(isset($_POST['Submit']))
{
. . .
$path =$_POST['Attachment'];
$filename = basename($path);
$encoding = "base64";
$type = "application/octet-stream";
$mail->AddAttachment('/var/www/tmp/proba.gif',$filename,$encoding,$type);
}
?>
Ustvari da budem precizniji, $path je jednak samo nazivu fajla tj. ako hocu da prikacim C:/ccc/mmm/proba.gif , $path=proba.gif ???? Zbog cega ovo?? Zar nebi trebalo da je $path=C:/ccc/mmm/proba.gif?
Da napomenem samo da se mail lepo pošalje ali bez attachmenta ...
[Ovu poruku je menjao Shejn dana 14.08.2006. u 08:25 GMT+1]