Location: PHPKode > scripts > K-Pregs > k-pregs/examples/filename_has_extension.php
<?php

require("../kpregs.php");

/*
Check if a filename has exact extension
*/

if (kpreg_filename_has_extension("file.php","php")) // valid
 echo("Valid!");
else
 echo("Invalid!");

?>
Return current item: K-Pregs