请问如何在自己开发的插件里引入第三方类库看手册应该是在里配置

迅睿框架 更新 2020-12-08 21:11:19 rewalax

请问如何在自己开发的插件里引入第三方类库?看官方手册应该是在App/MyAPP/Config/Auto,php里配置,但试了半天还是没搞好,请各位大佬不吝赐教啊。


https://www.xunruicms.com/doc/767.html

<?php

// 自动加载识别文件

return [
    /**
     * -------------------------------------------------------------------
     * Namespaces
     * -------------------------------------------------------------------
     * This maps the locations of any namespaces in your application
     * to their location on the file system. These are used by the
     * Autoloader to locate files the first time they have been instantiated.
     *
     * The '/application' and '/system' directories are already mapped for
     * you. You may change the name of the 'App' namespace if you wish,
     * but this should be done prior to creating any namespaced classes,
     * else you will need to modify all of those classes for this to work.
     *
     * DO NOT change the name of the CodeIgniter namespace or your application
     * WILL break. *
     * Prototype:
     *
    'Phpcmf\Home'                  => CMSPATH.'Control/Home',
    'Phpcmf\Admin'                 => CMSPATH.'Control/Admin',
    'Phpcmf\Member'                => CMSPATH.'Control/Member',
     */
    'psr4' => [
        

    ],

    /**
     * -------------------------------------------------------------------
     * Class Map
     * -------------------------------------------------------------------
     * The class map provides a map of class names and their exact
     * location on the drive. Classes loaded in this manner will have
     * slightly faster performance because they will not have to be
     * searched for within one or more directories as they would if they
     * were being autoloaded through a namespace.
     *
     * Prototype:
     *
     *    'MyClass'   => '/path/to/class/file.php'
     */
    'classmap' => [
        
        
    ],
    
    
];


方案

  • 司马老贼 #1 · 2019-12-18 20:11:01
    你要做什么?
  • rewalax #2 · 2019-12-18 20:18:28
    司马老贼 做短信接口开发,虽然商城里有了,但是还是想自己学习开发一下
  • 易学习 #3 · 2019-12-18 20:48:53
    短信接口用不着这种功能啊
  • 迅睿框架创始人 #4 · 2019-12-18 20:52:00
    满意答案
    文档已更新,这个文档不适合做短信接口,这个文档时候做大型插件APP开发自定义短信接口看专门有篇文章
  • 唉呦喂 #5 · 2019-12-18 23:07:37
    学无止境
  • rewalax #6 · 2020-12-08 21:11:19
    迅睿框架创始人:谢谢回复

迅睿系统漏洞

GeoSeo工具箱
GeoSeo工具箱(2026-11-30)
新增内容创作工作台 优化CSS样式归集
分类信息
分类信息(2026-11-30)
分类信息把招聘、房产、二手、本地服务和商家收成同城门户。访客按开通城...
AI文章生成器
AI文章生成器(2026-11-30)
优化模型思考模式配置
小黄人工具箱
小黄人工具箱(2026-11-28)
新增模块列表栏目树功能
留言板
留言板(2026-11-28)
可用于在线留言,预约,反馈,询盘,后台可查看留言信息和审核
签到管理
签到管理(2026-11-27)
修复失效图标
站长工作台
站长工作台(2026-11-27)
1 新增 网站信息自定义字段支持删除功能 2 新增 网站信息--...