Page 1 of 1

mail attachment problem

Posted: Thu Mar 10, 2005 12:26 pm
by wrgill999
i am using a class i found online for sending a mail attachment. the attachment is just a text file. it works fantastic, IF, i use the entire path to the file as the filename.
for example:

if i use:

$filename="../path/file.txt";
$fd=fopen($filename, "r");

this works fine, but it names the file .._path_file.txt.

what i want to do is this:

$filename="file.txt";
$fd=fopen("../path/".$filename,"r");

this will send the file as file.txt, but it will be a totally empty file.

i have also tried using absolute paths.

is there a solution to this?

thanks.