Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get file name from file path in php

<?php
$path_parts = pathinfo('/www/htdocs/inc/lib.inc.php');

echo $path_parts['dirname'], "
";
echo $path_parts['basename'], "
";
echo $path_parts['extension'], "
";
echo $path_parts['filename'], "
"; // since PHP 5.2.0
?>
Comment

get file name from url in php

// Get Opened Script Page Name
        $pagename = basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);
Comment

PREVIOUS NEXT
Code Example
Php :: how to know the path of php in linux 
Php :: laravel where not 
Php :: create view from route laravel 
Php :: wordpress plugin add stylesheet 
Php :: laravel validation required_if one parameter exist 
Php :: create slug with php 
Php :: how set field after another field in migration in laravel 
Php :: codeigniter redirect 
Php :: how to use multiple permission in blade 
Php :: laravel in array blade 
Php :: how to check mobile or desktop in php 
Php :: how to change existing migration laravel 
Php :: php creazione numero random 
Php :: fetch value from json link in php 
Php :: get url link in php 
Php :: laravel elasticsearch migration in laravel 
Php :: Laravel randomise data from database 
Php :: object php 
Php :: php laravel assert on error show message 
Php :: php replace all spaces with dashes 
Php :: redirection in php 
Php :: separate numbers with commas laravel 
Php :: woocommerce profile photo upload 
Php :: php sort associative array by specific value 
Php :: cake php 2.x joins 
Php :: laravel iteration 
Php :: php get first word of string 
Php :: order by in datatable laravel 
Php :: php check if folder exists 
Php :: Sending Data over another website via laravel 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =