• 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

PHP: How to raise number to (tiny) fractional exponent?

PHP Array split string and Integers

Get all WooCommerce products within own plugin

In PHP, which is faster: preg_split or explode?

Laravel whole batch is cancelled if one Job fails

Laravel Unknown Column 'updated_at'

How to add class name to an existing tag in php

I want a way to give path to my files which are outside of public folder in laravel

How to extract price from given url using Xpath?

Laravel: Why is my variable not being set while it's in the construct function of the controller?

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

Symfony Error: "An exception has been thrown during the rendering of a template"

Detect a fetch request in PHP

Additional price based on cart item count in WooCommerce

Laravel csrf token mismatch for ajax POST Request

About Contact Privacy policy Terms and conditions