• 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

Require a class from another class - php

phprequire


PHP Snippet 1:

require dirname(__FILE__, 2) . '/Task.php';

PHP Snippet 2:

require '../Task.php';

Related Snippets

Exact alternate to mcrypt_encrypt in PHP 7.2

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

Class AppHttpControllersUserController Does Not Exist

CodeIgniter force_download is not working

Display the WooCommerce product price inside a custom function

Wordpress wpdb->delete issue

How to Generate PDF invoice to XML format using mPDF

Laravel Model save() & update() Not Saving

Show only featured products in Woocommerce shop page

Transpose multidimensional array and join values with commas

Nginx RTMP not recording

Filter array by skipping every nth element from the end

Display Link Title Instead of URL in XSL

How to remove from a multidimensional array all duplicate elements including the original?

PHP's array_map including keys

About Contact Privacy policy Terms and conditions