Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

FUCK PHP IS A WHORE

Name: Anonymous 2009-07-26 17:11

I want to read the subject.txt, but it's 1,5 mebibyte of data that I don't want to be read every time I run the script. How do I make it read the file lazily?

Name: Anonymous 2009-07-26 17:29

Use Haskell.

Name: Anonymous 2009-07-26 17:32

>>2
Yeah that's what I'd normally do, but FUCK I HAVE TO USE PHP NOW. I need to write some fibs.

Name: Anonymous 2009-07-26 17:33

How about you just read the part you want?

Name: Anonymous 2009-07-26 17:42

>>4
http://pl2.php.net/manual/en/function.file.php
Reads an entire file into an array.
Entire file, you anus!

Name: Anonymous 2009-07-26 17:53

>>5
How about fopen(), you anus!

Name: Anonymous 2009-07-26 17:59

>>2
hahaha
U MENA HASKAL

Name: Anonymous 2009-07-26 18:02

>>1
Can't you fseek() in PHP?

Name: Anonymous 2009-07-26 18:05

>>7
I spread my anus wide as the Atlantic ocean, and it devours you head to foot like a slobbery wet stinking sarlacc dripping with bits of corn

Name: Anonymous 2009-07-26 18:10

>>8
How is that related? When I have fopen() I can just fgets() what I want.
>>7
What do you mean?

Name: Anonymous 2009-07-26 18:31

>>10
Protip: fopen() and fgets() don't read the whole file into memory every time. It already works the way you want it to.

Name: Anonymous 2009-07-26 18:49

>>11
That's what I said.

Name: Anonymous 2009-07-26 18:50

Some clarification: I just said that fopen() and fgets() do what I want, and you said exactly he same. HIBOT?

Name: Anonymous 2009-07-26 19:14

# while true; do wget subject.txt; done

Name: Anonymous 2009-07-26 20:23

>>14
NO THANK YOU

Name: Anonymous 2009-07-27 14:57

ok i did that thanks

Name: Anonymous 2009-07-27 15:03

Just use fopen and fgets like you always have. file_get_contents is just a wrapper around fopen fgets fclose, the PHP manual says so itself. but damn if it doesn't save me from writing 3 more lines of code

Name: Anonymous 2011-02-03 1:40

Don't change these.
Name: Email:
Entire Thread Thread List