xbdsky
V2EX  ›  PHP

类不存在: swoole ? 如何解?

  •  
  •   xbdsky · Jan 15, 2020 · 4763 views
    This topic created in 2335 days ago, the information mentioned may be changed or developed.

    框架使用的是这个 https://www.thinkcmf.com/
    使用的是 cmf-swoole https://github.com/thinkcmf/cmf-swoole
    api 里面调用 报这个错误
    22A44387B95D3EBF043FFF530463039F.jpg

    api 接口的内容是这个
    D234DB0B9DF7718EC4D1875EB26BD38B.jpg

    app 里面调用是没有问题的?
    ABA24F593CBBD59B364912CE0392106A.jpg
    望大神指点一二呢?

    11 replies    2020-01-16 11:48:57 +08:00
    xbchaonba
        1
    xbchaonba  
       Jan 15, 2020
    弱弱的问一句,你装了 swoole 这个扩展了吗
    xbdsky
        2
    xbdsky  
    OP
       Jan 15, 2020
    @xbchaonba 装了,也启动了
    caixiaobao
        3
    caixiaobao  
       Jan 15, 2020
    弱弱地问一句,还不知道 swoole 吧?建议先去搜索学习下。
    弱弱地说一句,支持款到教程到。
    chinagxwei
        4
    chinagxwei  
       Jan 15, 2020
    php -m 看看是否有 swoole ?
    xbdsky
        5
    xbdsky  
    OP
       Jan 15, 2020
    @chinagxwei 有的,基础的都已经处理过了
    chinagxwei
        6
    chinagxwei  
       Jan 15, 2020
    @xbdsky 那给出信息太少,我也不清楚了。
    xbdsky
        7
    xbdsky  
    OP
       Jan 15, 2020
    xbchaonba
        8
    xbchaonba  
       Jan 15, 2020
    你访问的是不是启动服务后的地址
    CodeToLife
        9
    CodeToLife  
       Jan 15, 2020
    调用要走 swoole 起的服务端口,不是 fpm 下的。
    dilu
        10
    dilu  
       Jan 16, 2020 via Android
    首先,thinkcmf 已经很久没看了。其次,swoole 是 cli 扩展,不是 fpm。通俗的说,不是你把 nginx 启动一下的事,而是要用 php cli 去运行你的代码,这是两种完全不同的开发方式。
    xbdsky
        11
    xbdsky  
    OP
       Jan 16, 2020
    @dilu 嗯嗯,谢谢了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 86ms · UTC 19:09 · PVG 03:09 · LAX 12:09 · JFK 15:09
    ♥ Do have faith in what you're doing.