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

迅睿框架 更新 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
    迅睿框架创始人:谢谢回复

迅睿系统漏洞

站群分站系统
站群分站系统(2026-10-15)
子站域名新增llms.txt访问
GEO系统
GEO系统(2026-10-14)
修复下载zip空白地址问题 修复流量复刻和任务队列错误
GeoSeo收录宝
GeoSeo收录宝(2026-10-14)
新增 站长工具箱 前端首页自动调用meta 数据
滑块验证码 Gocaptcha
滑块验证码 Gocaptcha(2026-10-13)
基于开源项目 go-captcha 的行为验证码插件,滑动拼图、区域...
GeoSeo工具箱
GeoSeo工具箱(2026-10-13)
优化巡检任务
GeoSeo排名助手
GeoSeo排名助手(2026-10-11)
加入大模型自定义
SEO聚合关键字
SEO聚合关键字(2026-10-11)
优化关键字列表页最多支持1万篇文章,过多会导致服务器扛不住;
CMS内容同步复制
CMS内容同步复制(2026-10-10)
增加时间是否更新的开关