Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged line



« Prev 1 Next »
Read a file with the file function
0 1454 posted 5 years ago by martinbrait
read the first line of text of a file on the server To read the first line of text in your file: The fgets () function retrieves the first 4096 characters from the first line of your file.
0 1604 posted 5 years ago by martinbrait
If you want to use PHP as a command line program, this code can serve s a reference to read the arguments passed to the program.
0 952 posted 13 years ago by tcam27
This method is easy to write, but not very efficient, as you can imagine.
2 1632 posted 14 years ago by dyteq
1 1163 posted 14 years ago by dmistriotis
2 6481 posted 15 years ago by iTony
i know these regex stuff is rather slow, but still i like having slim documents. (don't forget to use gzip compression on all text docs)
3 1064 posted 15 years ago by iroybot
This will print every number from 0000-9999. Each number is comma separated. The goal was not pretty / readable code, but to get all code on a single line.
0 757 posted 16 years ago by tgpo
« Prev 1 Next »