Created
February 15, 2017 16:52
-
-
Save YurePereira/bf66c10a2958a3424e7eb32e9fcd521e to your computer and use it in GitHub Desktop.
Utilizando o função file_exists no PHP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Caminho do arquivo | |
| $path = '../my_folder_name/my_filename.php'; | |
| //Retornará true se o arquivo existir | |
| if (file_exists($path)) { | |
| //Se o arquivo existir podemos incluí-lo. | |
| include($path); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment