PHP » PYTHON |
login |
register |
about
|
open(filename).readlines() file(PHP 4, PHP 5) file — Reads entire file into an array Description
array file
( string $filename
[, int $flags= 0
[, resource $context
]] )
Reads an entire file into an array.
Parameters
Return ValuesReturns the file in an array. Each element of the array corresponds to a line in the file, with the newline still attached. Upon failure, file() returns FALSE.
Changelog
Examples
Example #1 file() example
<?php
NotesWarning
When using SSL, Microsoft IIS will violate the protocol by closing the connection without sending a close_notify indicator. PHP will report this as "SSL: Fatal Protocol Error" when you reach the end of the data. To work around this, the value of error_reporting should be lowered to a level that does not include warnings. PHP 4.3.7 and higher can detect buggy IIS server software when you open the stream using the https:// wrapper and will suppress the warning. When using fsockopen() to create an ssl:// socket, the developer is responsible for detecting and suppressing this warning. See Also
|
more
Recently updated
more
Most requested
more
Last requests
|