业务经理

微信扫描以上二维码

028-61286886

技术咨询

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

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

迅睿系统漏洞

AI文章生成器
AI文章生成器(2026-10-29)
任务插图设置数量
Bing站长数据
Bing站长数据(2026-10-29)
根据BING接口调整菜单 各个页面数据支持点击查看详情
泛解析站群系统
泛解析站群系统(2026-10-29)
AI队列增加清空按钮 表单提示语收敛 目录模式不接管主域名模板
全站模块搜索
全站模块搜索(2026-10-28)
实现全模块一次性搜索内容,一键搜索全站内容精准搜索全部模块:
域名授权系统
域名授权系统(2026-10-28)
后台增加前台访问地址链接
GeoSeo收录宝
GeoSeo收录宝(2026-10-28)
1 优化 BreadcrumbList 前端输出item细节 ...
自定义单页
自定义单页(2026-10-28)
增加批量设置url地址 URL规则和分页规则改为页面编辑界面 低...
邀请注册返现
邀请注册返现(2026-10-28)
本插件仅限于邀请注册会员充值时返现给邀请者,可查看邀请的关系列表如果...
友情链接
友情链接(2026-10-28)
用于网站友情链接的后台录入,前台提供调用代码,有网站标题、网站log...
关键词TAG
关键词TAG(2026-10-28)
[高级版]增加补录索引生成按钮 [高级版]针对建站系统高级版进行查询...