cancel
Showing results for 
Search instead for 
Did you mean: 

[Essentia Guide] How To Check File Exists Or Not In Magento 2 Programmatically?

[Essentia Guide] How To Check File Exists Or Not In Magento 2 Programmatically?

Most people working in the industry for years get confused about how to check whether a file exists or not programmatically in Magento 2. Here, I will share a simple step-by-step method to do it- 

 

Step 1: You need to create a block file in your custom module
Step 2: After creating the block file you need to create a template file customfile.phtml path:
Step 3: You need to create a default layout default.xml file path:

 

Click here to learn about all methods in detail

Problem solved? Please give 'Kudos' & Accept as a Solution
Best Magento 2 Extensions