Hello,
I don't think the problem you have is not the size of the file.
It seems to depend on the content of that.
(line 1) $a = 'abc%d';
(line 2) printf( "$a" );
will cause too-few-arguments error
because variable $a contains the sequence of '%','d', which should be interpreted as
formatting characters if you don't want it.
use print() instead of printf(),
or do like this: printf ( "%s\n", $conteudo );h
Moriyoshi
"In$BqS(Bcia Sensorial Trabalhando" <[EMAIL PROTECTED]> wrote:
> He said no, here's the error:
>
> Warning: printf(): too few arguments in /htdocs/content.php on line 20
>
> And here's the code. Remember that only fails on large files:
>
>
>
>
> SITUA$B%L%F(BO DA CAIXA POSTAL
>
>
> Resultado da Consulta para: .
>
>opendir ("/var/mail");
> chdir ("/var/mail");
> // A vari$BaW(Bel $login_usuario obtida em index.html
> // xxx.xxx.com.br/gbj/index.html
> if (file_exists("$login_usuario")) {
> printf ("SITUA$B%L%F(BO DA CAIXA POSTAL\n\n");
> $situacao = `ls -ld $login_usuario`;
> printf ("$situacao\n");
> printf ("CONTE$B%l(BDO DA CAIXA POSTAL\n\n");
> $conteudo = `mailx -H -f /var/mail/$login_usuario`;
> printf ("$conteudo\n");
> }
> else
> {
> printf ("O usu$BaS(Bio $login_usuario n$BeP(B foi encontrado.\n");
> }
> ?>
>
>
>
>
> --
>
> Julio Nobrega
>
> A hora est chegando:
> http://toca.sourceforge.net
> "John Meyer" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 05:14 PM 8/17/01 -0300, In$BqS(Bcia Sensorial Trabalhando wrote:
> > Hi All,
> >
> > A friend of mine said his printf is failing when he parses a variable
> from
> >a 4.5 mega file. On smaller files, it works fine.
> >
> > There's a limit on the printf or somewhere else?
> >
> > Thanks.
>
>
> Is he throwing the _entire_ 4.5 MB file into that variable and trying to
> print that?
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]