• 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

WordPress Subquery returns more than 1 row on SELECT

Creating live search with AJAX and CodeIgniter

Combine multiple columns into an array as one of the key in a results set

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

Is there an equivalent of DynamoDB on Azure as a PHP session Handler

Handle error for duplicate entries - PHP/MySQL

Install mysql client in docker image

PHP mail sending empty mails

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

WAMP/Wordpress - cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

Testing subscription renewals on Stripe

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

How to run or debug php on Visual Studio Code (VSCode)

PHP - installing Xdebug on Mac with XAMPP (Unix File)

How to validate tin and cst using PHP?

About Contact Privacy policy Terms and conditions