业务经理

微信扫描以上二维码

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

迅睿系统漏洞

独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo收录宝
GeoSeo收录宝(2026-09-12)
1 优化Update.php文件,解决版本在线升级不完整问题 2 ...
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...
阿里云滑动验证码
阿里云滑动验证码(2026-09-10)
采用阿里云验证码替换迅睿系统自带的图片验证码和滑动验证码。后台设置方...
下载Plus
下载Plus(2026-09-09)
为网站附件下载加上“计数、限次、统计、防护”四重能力:按用户组控制下...