php-windows Digest 21 Dec 2003 05:13:02 -0000 Issue 2050
Topics (messages 22406 through 22409):
random access file with php
22406 by: Idur
22407 by: Svensson, B.A.T. (HKG)
22408 by: Svensson, B.A.T. (HKG)
Problem with Modules
22409 by: Cole Hubbard
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi there,
I have a big file txt to read(about 40 Mb), and i have
script to read this file, suddenly i realise that my
methode to read file is using "sequential access"
mode, but this process take time to
long(max_time_execution = 90) and i need the methode
to read in "random access" with php, i heared that
random access is more fastest than sequential access,
where i can get the tutorial about file operations
(random access mode) using php.
Because it's very little informations that i can get
from php manual about random access mode(they told to
use fseek) or i don't the right place or right site to
get this informations.
thanx
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--- End Message ---
--- Begin Message ---
In order to uses random access, you should, indeed, use fseek().
But then you need to know how how your file looks like,
that is, each record must be of either fixed lenght, or
each record should store a "pointer" about how long they
are.
Any file polated with lumps wont do here.
Why is this needed? Simply becuase fseek() moves the read
head to a certain position in your file, and if you don't
know what position you like to go to then fseek() is kind
of useless.
Anyhow, there are tutorial on how to do random access reading:
The two first hit I had on google when searching on
"turotial random access fseek" was:
http://crasseux.com/books/ctutorial/File-position.html
http://www.cms.livjm.ac.uk/library/cd2018/Coursework%202/random_access_files
.doc
and they seams to be oki - spent 5 second checking them
out thouhg - so you might like to check out the other +400
hits to. Oki, just start read, and then have happy hacking.
Have fun!
-----Original Message-----
From: Idur
To: [EMAIL PROTECTED]
Sent: 2003-12-20 07:19
Subject: [PHP-WIN] random access file with php
Hi there,
I have a big file txt to read(about 40 Mb), and i have
script to read this file, suddenly i realise that my
methode to read file is using "sequential access"
mode, but this process take time to
long(max_time_execution = 90) and i need the methode
to read in "random access" with php, i heared that
random access is more fastest than sequential access,
where i can get the tutorial about file operations
(random access mode) using php.
Because it's very little informations that i can get
from php manual about random access mode(they told to
use fseek) or i don't the right place or right site to
get this informations.
thanx
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> Any file polated with lumps wont do here.
"poluted" or "populated" - you may chose any spell correction here.
--- End Message ---
--- Begin Message ---
I just set up my webserver on an old Windows 2000 box that I have.
AMD Athlon 750Mhz, 512MB RAM, 4GB hard drive
Should be enough to test scripts and everything that I might need to do,
and so far it's working just great. I'm running IIS on this server.
Whichever version that comes with 2000, I think it's 4.0. Maybe 5.
Perl installed great, and it runs great. I manually installed the full
binaries for PHP, went in just fine. Except for when I try to load
scripts. The first time I run a script on the server it gives me about
five errors saying it cannot find module files. I've checked that these
files are in the location that the program is looking for them in, but
PHP just isn't finding them. I have no clue why.
Any help would be appreciated.
~Cole Hubbard
--- End Message ---