• 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

Laravel - How to properly generate unique slugs from article titles?

Wordpress add responsive srcset header image to theme

Add customer email and phone in "Order" column to admin orders list on Woocommerce

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Array to string conversion

How should I get started using PHPUnit as a testing framework for a bunch of functions and classes I have already made?

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

how to hide previous markers when new markers added in google map javascript api

Dropzone: Submit both form data and dropzone at once

Add Class in html Dynamically in PHP

How can I make this nested location configuration use the correct path to call a php program?

Entity provider not working in security.yml php symfony3.4 ({"code":401,"message":"bad credentials"}.)

Facebook API, get page post link (PHP)

Laravel passport auth token not working after moving to different server

Handle error for duplicate entries - PHP/MySQL

About Contact Privacy policy Terms and conditions