Home >Backend Development >PHP Tutorial >CakePHP 32 plug-in introduction plug-in article

CakePHP 32 plug-in introduction plug-in article

WBOY
WBOYOriginal
2016-07-29 08:59:391036browse

Introduce PHP base class

Configuration file

app

--vendor

--composer

--autoload_classmap.php

Configure the relative path in the configuration file

<?php
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    &#39;PHPExcel&#39; =>$vendorDir .'/PHPExcel/PHPExcel.php'
);

If you want to introduce the corresponding class file Controller and other programs

use PHPExcel;
When you write this code in the file header, you will find that you can successfully instantiate the content of this class. When you want to use other classes introduced in the class file, similar to the file header Just write user XXXXX; and that’s it.

The above introduces the CakePHP 32 plug-in introduction chapter, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn