PHP - Write to File - file_put_contents()

preview_player
Показать описание
You can write variables to a file with file_put_contents(). If the file pointed to does not exist it will be created. By adding FILE_APPEND this will append data to the created file, if not the file will be over written.
Рекомендации по теме
Комментарии
Автор

Cool analogy! Php is the Secretary of the Internet. 🖤

Calm_Energy
Автор

I would appreciate if you would indicate the security concerns that may be related to file_put_contents() ? Thanks.

firstsquares
Автор

Thank you for giving Idea and knowledge I am from India 🇮🇳🇮🇳🇮🇳

siddheshkhandare
Автор

Hi Eli, this tutorial really helps.
My name is Ruud, from Amsterdam. I have created a star rating system using only HTML and CSS, but now I am struggling with the PHP code to store the data (after Submit) directly into a .txt file or .html file or .php file. Can you help me out?

ruudkorunka
Автор

this too a better example could be given

giridharpavan