• 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

How to add a sidebar to Woocommerce Shop Page?

Check if string contains a value in array [duplicate]

Limit login attempts in Laravel 5.7

yii2 and mssql insert varbinary into model

Laravel Schedule not sending email

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

How can I stop a symfony process which is listening on http://127.0.0.1:8000

Exact alternate to mcrypt_encrypt in PHP 7.2

Not able to override collapsible.js in magento 2

Show rotation of tweets using current day of month

XML to CSV with PHP converter [problem with images grabing]

Laravel Model save() & update() Not Saving

How to send image,audio or video through the WhatsApp API - PHP

PHP: PDO + CSV export not downloading (headers issue?)

Woocommerce redirect after add-to-cart error

About Contact Privacy policy Terms and conditions