Testing - PHP

pathinfo()

Simple Example

$path0a = pathinfo('/www/htdocs/gym/index.php');
$path0a['dirname'] = /www/htdocs/gym
$path0a['basename'] = index.php
$path0a['extension'] = php
$path0a['filename'] = index

checkFileExtension()

$path = index.php

Filename extension = 'php'

$path = index

Filename extension does NOT = 'php'

checkFileExtension2()

$path = index.php

Filename extension = 'php'

$path = index

Filename extension does NOT = 'php'

checkFileExtensionPlus()

$path = index.php

$path = index

Filename extension does NOT = 'php'... Adding '.php' to filename...

$correct_filename = index.php