• 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

Laravel 5 issue with wherePivot

User pool client {id}does not exist

How to get the total hour from starting time to end time in php

SQLSTATE[HY000]: General error: 1 table posts has no column named *

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

Webscraping Symfony/Panther: Can't get HTML

browsersync doesn't work with XAMPP

Get WooCommerce product variation attribute terms in admin products general box

How to upload mpdf file after generating to s3 bucket in php

Sentry on Symfony: how to exclude `NotFoundHttpException`

Zig-zag scan an N x N array

Laravel 5.1 Unknown database type enum requested

How to get multiple values with same key from an array PHP

Match single unknown parameter php (Morse-code Regex)

Using spatie/media-library, how to rename a collection of uploaded files?

About Contact Privacy policy Terms and conditions