i want to check if a file has the extensions .php. if it has i include it.
could someone help me with a regexp check?
thanks!
Usually you don't use a regular expression.
The following is a popular method instead:
$extension=pathinfo($filename, PATHINFO_EXTENSION);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With