• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Find out the name of the last script that included the current one

phpserverincludephp-7php-8


PHP Snippet 1:

$files = get_included_files();
list($parent) = array_slice($files, -2, 1);
echo $parent;

Related Snippets

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

Form Validation and Submission to database

cakephp save drag and drop list order to database

How can I make good efficent AJAX live forms with just jQuery and

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

PHP how to detect if running on arm64 cpu?

How to install ZeroMQ for PHP on an Alpine Linux container?

sort() not affecting original array while inside foreach loop

How to use PHPCBF to fix one issue at a time?

Get sum of arrays inside array

How do I remove this delivery notification from here?

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

Composer fails with kylekatarnls/update-helper on new homestead

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Custom API and cunsuming in php?

About Contact Privacy policy Terms and conditions