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 ( "<font color=blue>%s</font>\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:
> 
> <html>
> <!-- GBJ -->
>  <head>
>   <title>SITUA$B%L%F(BO DA CAIXA POSTAL</title>
>  </head>
>  <body>
>      Resultado da Consulta para: <b><? printf ($login_usuario) ?></b>.
>     <pre>
> <?php
>   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 ("<b>SITUA$B%L%F(BO DA CAIXA POSTAL</b>\n\n");
>       $situacao = `ls -ld $login_usuario`;
>       printf ("<font color=blue>$situacao</font>\n");
>       printf ("<b>CONTE$B%l(BDO DA CAIXA POSTAL</b>\n\n");
>       $conteudo = `mailx -H -f /var/mail/$login_usuario`;
>       printf ("<font color=blue>$conteudo</font>\n");
>     }
>   else
>       {
>       printf ("O usu$BaS(Bio $login_usuario <b>n$BeP(B foi encontrado</b>.\n");
>       }
> ?>
>     </pre>
>     </body>
> </html>
> 
> --
> 
> 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]

Reply via email to