programming faqs interview questions tech technical educational freshers guide preparation interviews hr telephonic
try another color:
try another fontsize: 60% 70% 80% 90%
Programming FAQs

how to get the file name from the path using php

using basename function we

using basename function we can get the file name

syntax: string basename ( string $path [, string $suffix] )

eg:
$path = "home/www/pfaqs/view_question.php";
$file = basename($path); // o/p view_question.php
$file = basename($path, ".php"); // o/p view_question