<?php $path = "/testweb/home.php"; $filename = basename($path); $filename_without_php_extension = basename($path,".php");