• 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

backup files to google drive using PHP

Edit product hook WooCommerce

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

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

Laravel display validation error

WordPress Subquery returns more than 1 row on SELECT

Shortcode or PHP inside a shortcode in Wordpress

Correctly determine if date string is a valid date in that format

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

Laravel Excel::store file empty after stored

how can I set a session variable in Drupal 8 and get it in a php script?

How to loop sql table data inside a html table

Transform array, set each array element with parent key php

Wordpress how to get the post thumbnail inside a figure tag

How to extract price from given url using Xpath?

About Contact Privacy policy Terms and conditions