Reply to Re: fopen - File too large

Your name:

Reply:


Posted by Peter van Schie on 07/14/05 00:53

Kasper Johansen wrote:
>
> As a workaround I have used this line of code:
>
> popen("cat /filenpathanddir", "r");
>
>
> My problem is that I want to jump around in the file (like fseek()), and I
> havent figured out how to do this while using popen() (and "cat"). I only
> have to read the last 5 mb of total 2,4 gb.
>
> Can anyone point me in the direction of how to solve this problem?
>

Hi Kasper,

Instead of using cat, you could use tail if you only need the last xx mb
of the file:

popen("tail --bytes=5120 /fileenpathanddir", "r");

HTH.

--
http://www.phpforums.nl

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация