Writing to a text file

This is probably something real simple for the Gurus.

In a project we are working, we have a need to write to an ordinary text file (will contain some custom js settings for a slider). I cannot for the life of me find anything in search (forum and online) how to do this.

A pointer or 2 would be greatly appreciated.

Thanks.

There is a core file helper with file writing and reading.

Also available within the vendor code is Flysystem

https://flysystem.thephpleague.com/docs/getting-started/

The core file helper is good for odds and ends. Flysystem is more versatile for complex stuff and is great for connection to other file spaces - ftp etc., via adapters.