Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged line



« Prev 1 Next »
Read a file with the file function
0 973 posted 4 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 1038 posted 4 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 570 posted 12 years ago by tcam27
This method is easy to write, but not very efficient, as you can imagine.
2 1082 posted 13 years ago by dyteq
1 674 posted 13 years ago by dmistriotis
2 5327 posted 14 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 658 posted 14 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 467 posted 15 years ago by tgpo
« Prev 1 Next »