Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged line



« Prev 1 Next »
Read a file with the file function
0 133 posted 10 months 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 121 posted 10 months 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 73 posted 9 years ago by tcam27
This method is easy to write, but not very efficient, as you can imagine.
2 186 posted 9 years ago by dyteq
1 93 posted 9 years ago by dmistriotis
2 613 posted 10 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 84 posted 10 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 59 posted 11 years ago by tgpo
« Prev 1 Next »