I’m new to HEROKU APPS.
In my heroku app i have a problem. that is I’m using a php script to save data on server.
Example :
<?PHP
$file = "example.txt";
$data = "Something...";
file_put_contents($file,$data);
?>
This PHP script run successfully and save data perfectly.
But, when I deploy my APP to HEROKU to update -> in this precess example.txt file is automatically deleted.
Heroku File Systems
Heroku behavior varies depending a little on the stack you use. With Bamboo, most of the file system is read-only. With Cedar, it is ephemeral.
In either case, the file systems are not shared between dynos, and should not be used for storage. To reliably store data server-side, you will need to use the database (perhaps storing your uploads as blobs), or as external assets on another host or service.