Home >Backend Development >PHP Tutorial >CakePHP 32 plug-in introduction plug-in article
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( 'PHPExcel' =>$vendorDir .'/PHPExcel/PHPExcel.php' );
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.