/ Published in: PHP
I whipped this up after finding that my worst fears were true, pathinfo is slow. Top that with in_array and you've got your self some heavy code. Nothing like regex to speed things up.
This little code checks the extension of a path to see if it is a desired extension.
EDIT: the regex engine kills any speed benefits...
This little code checks the extension of a path to see if it is a desired extension.
EDIT: the regex engine kills any speed benefits...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php echo 'true'; } ?>