[PHP] Help with CHdir

2002-10-02 Thread Nokar

I get this error from php when i execute this code can you help me ;)
Warning: chdir() expects parameter 1 to be string, resource given in
C:\\read.php on line 146

145 echo centerAttachment :;
146 $rep = opendir(C:\\xxx\\Attach\\$id\\);
147 chdir($rep);
148 while ($zone = readdir($rep))
149 {
150 if (!is_dir($zone)) echo a
href=\../Attach/$id/$zone\$zone/abr;
151 }
152 echo /center;
153 }



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Not sure if it pass the first time : Help with imap attachment

2002-10-01 Thread Nokar

$attachdata[$x] = imap_base64($attachment);
on that part sometimes the attachdata get empty so i did a IF but at that
point i'm stuck. If i output it raw it will simply not work. Please help !

Here the code :

if ($AsAttach == Y)
{
for ($x=0;$xsizeof($attachments);$x++)
{
$pid[$x] = $attachments[$x][pid];
$type[$x] = $attachments[$x][type];
echo br PID : $pid[$x] br Type : $type[$x] br;
$attachment = quoted_printable_decode(imap_fetchbody($maillink, $z,
$pid[$x]));
$attach[$x] = $attachments[$x][name];
echo Attach name : $attach[$x];
$encoding[$x] = $sections[$x][encoding];
$attachdata[$x] = quoted_printable_decode($attachment);
$attachdata[$x] = imap_base64($attachment);
if ($attachdata[$x] == )
{
$attachdata[$x] =$attachment;
echo brI'm in here !!!br;
}
else
{
echo brI didnt came in here !!!br;
}
echo br;
}
}

Btw the encoding are :

7bits, Base64 and quoted-printable

Quoted-printable output correctly with the raw





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Help with Imap : getting attachment

2002-10-01 Thread Nokar

 $attachdata[$x] = imap_base64($attachment);
on that part sometimes the attachdata get empty so i did a IF but at that
point i'm stuck. If i output it raw it will simply not work. Please help !

Here the code :

if ($AsAttach == Y)
{
for ($x=0;$xsizeof($attachments);$x++)
{
$pid[$x] = $attachments[$x][pid];
$type[$x] = $attachments[$x][type];
echo br PID : $pid[$x] br Type : $type[$x] br;
$attachment = quoted_printable_decode(imap_fetchbody($maillink, $z,
$pid[$x]));
$attach[$x] = $attachments[$x][name];
echo Attach name : $attach[$x];
$encoding[$x] = $sections[$x][encoding];
$attachdata[$x] = quoted_printable_decode($attachment);
$attachdata[$x] = imap_base64($attachment);
if ($attachdata[$x] == )
{
$attachdata[$x] =$attachment;
echo brI'm in here !!!br;
}
else
{
echo brI didnt came in here !!!br;
}
echo br;
}
}

Btw the encoding are :

7bits, Base64 and quoted-printable

Quoted-printable output correctly with the raw



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php