Re: Printf fails on large files

From: Date: Fri, 17 Aug 2001 20:38:32 +0000
Subject: Re: Printf fails on large files
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-63225@lists.php.net to get a copy of this message
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ÇÃO 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ável $login_usuario é obtida em index.html // xxx.xxx.com.br/gbj/index.html if (file_exists("$login_usuario")) { printf ("<b>SITUAÇÃO DA CAIXA POSTAL</b>\n\n"); $situacao = ls -ld $login_usuario; printf ("<font color=blue>$situacao</font>\n"); printf ("<b>CONTEÚDO 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ário $login_usuario <b>não foi encontrado</b>.\n"); } ?> </pre> </body> </html> -- Julio Nobrega A hora está chegando: http://toca.sourceforge.net "John Meyer" <john_meyer@geocities.com> wrote in message news:5.1.0.14.0.20010817142852.009f4c10@pop.mail.yahoo.com... At 05:14 PM 8/17/01 -0300, Inércia 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?

« previous php.general (#63225) next »