• 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

html-php form submission after validation through JavaScript [closed]

PHP-Sort array based on another array?

What is the difference between client-side and server-side programming?

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

How to write PHP in XSLT

Yii2 select2 database exception number of bound variables does not match number of tokens

Get WooCommerce product variation attribute terms in admin products general box

Target class controller does not exist - Laravel 8

Exact alternate to mcrypt_encrypt in PHP 7.2

Convert every two values of an associative array into key-value pairs

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

PHP file_get_contents function

echo language construct is discouraged. (PHP)

Upgrade PHP on AWS Linux

How to to send mail using gmail in Laravel?

About Contact Privacy policy Terms and conditions