The best I could find, an if fclose fopen type thing, makes the page load really slowly.
if
fclose
fopen
Basically what I\'m trying to do is
You can use the filesystem: use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
and check $fileSystem = new Filesystem(); if ($fileSystem->exists('path_to_file')==true) {...