Search
 
SCRIPT & CODE EXAMPLE
 

PHP

filename php

echo "1) ".basename("/etc/sudoers.d", ".d").PHP_EOL;//sudoers
echo "2) ".basename("/etc/sudoers.d").PHP_EOL;//sudoers.d
echo "3) ".basename("/etc/passwd").PHP_EOL;//passwd
echo "4) ".basename("/etc/").PHP_EOL;//etc
echo "5) ".basename(".").PHP_EOL;//.
echo "6) ".basename("/");//
Comment

php get filename

<?php
    $xmlFile = pathinfo('/usr/admin/config/test.xml');

    function filePathParts($arg1) {
        echo $arg1['dirname'], "
";
        echo $arg1['basename'], "
";
        echo $arg1['extension'], "
";
        echo $arg1['filename'], "
";
    }

    filePathParts($xmlFile);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php regex match numbers only 
Php :: convert time to 24 hour format laravel 
Php :: get csv file from server folder in PHP 
Php :: php remove space from string 
Php :: IlluminateContractsContainerBindingResolutionException target calss does not exist 
Php :: woocommerce cart length button shortcode 
Php :: action after model is created laravel 
Php :: php pdo postegresql connection 
Php :: laravel validate datetime with datetime-local 
Php :: get_previous_posts_link add class wordpress 
Php :: insert data using seeder in laravel 
Php :: rand string php 
Php :: week day php 
Php :: php keep only digitts 
Php :: php -S localhost:8000 
Php :: pdo prepare 
Php :: remove string after comma in php 
Php :: how to add javascript in php 
Php :: laravel where multiple values 
Php :: php realpath 
Php :: php convert print_r to array 
Php :: limiting requests to controllers in laravel 
Php :: phpmyadmin username password check 
Php :: php check if query succeeded 
Php :: include php file from another folder 
Php :: php match 
Php :: ERROR: Could not enable dependency mpm_prefork for php7.4, aborting 
Php :: php get data from url 
Php :: combine 2 columns search query laravel 
Php :: login with email and phone laravel 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =