Identical to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE.
file_get_contents() is the preferred way to read the contents of a file into a string. It will use memory mapping techniques if supported by your OS to enhance performance.
Huomaa: If you're opening a URI with special characters, such as spaces, you need to encode the URI with urlencode().
Huomaa: T�m� funktio osaa k�sitell� my�s bin��rimuotoista dataa.
Vihje: T�m�n funktion kanssa voit k�ytt�� my�s URLia tiedostonimen sijaan jos "fopen wrappers" on kytketty p��lle. Katso funktiosta fopen() lis�tietoa tuetuista URL-protokollista ja siit� kuinka tiedoston nimi m��ritell��n Liite L.
Varoitus |
Some non-standard compliant webservers, such as IIS, send data in a way that causes PHP to raise warnings. When working with such servers you should lower your error_reporting level not to include warnings. |