I want to creat file this path : /var/logs/filename.fileextension . But ı dont create file ı have error ->Failed to touch "/var/logs/file.txt".
My Codes:
$fs=new Filesystem();
$fs->touch('/var/logs/file.txt');
I want to creat file this path : /var/logs/filename.fileextension . But ı dont create file ı have error ->Failed to touch "/var/logs/file.txt".
My Codes:
$fs=new Filesystem();
$fs->touch('/var/logs/file.txt');
Copyright © 2021 Jogjafile Inc.
So touch doesnt create a new file according to the docs.
read http://symfony.com/doc/current/components/filesystem.html
if you want to create a file you need to use the function dumpFile();
read http://symfony.com/doc/current/components/filesystem.html
This code should create a new empty file.