Jump to content


Fabio1

Member Since 17/09/2006
Offline Last Active 21/09/2006, 09:51
-----

Posts I've Made

In Topic: Caracteres Válidos Em Um Campo

18/09/2006, 05:01

Obrigado Goku Jr e Paulo Freitas, funcionaram perfeitamente.

@Paulo Freitas - O simplificado não funcionou. 70 caracteres muito? Melhor sobrar do que faltar! hehehe

Obrigado mesmo!

In Topic: Imagem Chega Toda "encriptada"

18/09/2006, 04:28

Decodando o "VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==" ficaria "This is an encoded string"!

Isso que queria? Não entendi direito...



Questão da sua dúvida.

Não vejo tanta necessidade de encodar o arquivo. Tente assim!

foreach ($attachments as $key => $full_path)
{
	if ($full_path !='') 
	{	  
		if (file_exists($full_path))
		{			
			if ($fp = fopen($full_path,"rb")) 
			{
				$filename = array_pop(explode(chr(92),$full_path));
				$contents = fread($fp,filesize($full_path));
				fclose($fp);
				$message .= "--$boundary\n";
				$message .= "Content-Type: $anexo_type\n";
				$message .= "Content-Disposition: attachment; filename=\"$anexo_name\" \n";
				$message .= "$contents\n";
			}
			else
			{
				echo "Impossível abrir o arquivo$key: $filename";
				$ABORT = TRUE;
			}
		}
		else 
		{
			echo "O arquivo$key não existe: $filename";
			$ABORT = TRUE;
		}
	}
}

In Topic: Compiladores Php

17/09/2006, 14:09

Olá Cristiano,

Esse código compilado não rodou no meu servidor.

Aqui está a demostração. http://www.japanmusi.../compilacao.php

Qual seria o problema?

IPB Skin By Virteq