Created
May 5, 2018 03:54
-
-
Save TimSC/90ccb4997028ecdb60e902b8115a6523 to your computer and use it in GitHub Desktop.
File exist testing
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 | |
$fiLi = glob("/home/tim/Desktop/test/*.pdf"); | |
while(true) | |
{ | |
$i = array_rand($fiLi); | |
if(!file_exists($fiLi[$i])) | |
throw RuntimeError("File said not to exist"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment