@me at briandichiara dot com
you want to have a look at the function "touch"
![]() |
|
||||||||||
|
file_put_contentsОписаниеint file_put_contents ( string filename, mixed data [, int flags [, resource context]] )Функция идентична последовательному вызову функций fopen(), fwrite() и fclose(). Возвращаемым функцией значением является количество записанных в файл байтов.
Параметр
Также вы можете передать (одномерный) массив в качестве параметра
Начиная с версии PHP 5.1.0, вы также можете передавать ресурс потока в
качестве аргумента
См.также описания функций fopen(), fwrite(), fclose() и file_get_contents(). file_put_contents
martin AT holzhauer D0T eu
29-Oct-2007 03:09
@me at briandichiara dot com
me at briandichiara dot com
04-Oct-2007 12:20
I was in need of a function that updated the last modified date in a php file. There may be a better way, but this is how I did it:
Curtis
21-Dec-2006 03:20
As to the previous user note, it would be wise to include that code within a conditional statement, as to prevent re-defining file_put_contents and the FILE_APPEND constant in PHP 5:
egingell at sisna dot com
23-Jul-2006 04:11
In reply to the previous note:
sendoshin at awswan dot com
05-Mar-2006 11:01
To clear up what was said by pvenegas+php at gmail dot com on 11-Oct-2005 08:13, file_put_contents() will replace the file by default. Here's the complete set of rules this function follows when accessing a file:
aidan at php dot net
20-May-2004 07:11
This functionality is now implemented in the PEAR package PHP_Compat. |