Code Monkey home page Code Monkey logo

docs's People

Contributors

2kgeekc avatar buexplain avatar forthxu avatar gxlct008 avatar laraveladmin-cn avatar matyhtf avatar nathanfreeman avatar ningxiaofa avatar randolphjiffy avatar windqyoung avatar xuanyanwow avatar yansongda avatar yurunsoft avatar zingjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docs's Issues

临时解决 站点不可用 fonts.loli.net

因为 fonts.loli.net 地址不可用,出现 https://www.swoole.com/ 打不开的情况

image

解决办法:使用浏览器地址重定向即可,地址重定向规则如下:

{
  "action": {
    "redirect": {
      "transform": {
        "host": "fonts.googleapis.cn",
        "scheme": "https"
      }
    },
    "type": "redirect"
  },
  "condition": {
    "requestDomains": [
      "fonts.loli.net"
    ],
    "resourceTypes": [
      "main_frame",
      "sub_frame",
      "stylesheet",
      "script",
      "image",
      "font",
      "object",
      "xmlhttprequest",
      "ping",
      "csp_report",
      "media",
      "websocket",
      "other"
    ],
    "urlFilter": "|http*://fonts.loli.net"
  },
  "id": 2,
  "priority": 2
}

请问,我测试线程的map报错

<?php
use Swoole\Thread;
/** 使用map传递数据 */
use Swoole\Thread\Map;

$args = Thread::getArguments();
if (empty($args)) {
    $map = new Map;
    $thread = new Thread(__FILE__, 2, $map);
    sleep(1);
    $class = new stdClass();
    $class->name = "张三556565";
    $map['test'] = $class;
    $map->add('demo','lucy');
    $thread->join();
} else {
    $map = $args[1];
    sleep(2);
    var_dump($map['test']);
    var_dump($map['demo']);
    var_dump($map->keys());
    var_dump($map->count());
    var_dump($map->values());
    var_dump($map->toArray());
}

报错:Fatal error: Uncaught Error: Call to undefined method Swoole\Thread\Map::values() in /var/www/swoole/map.php:23
Stack trace:
#0 {main}
thrown in /var/www/swoole/map.php on line 23

补充:本地 预览文档 的方法

预览文档 补充说明:

预览文档,只需要进入 public 目录 运行web 服务即可

浏览器打开 http://0.0.0.0:9503 即可预览文档

cd  docs/public/

php -S 0.0.0.0:9503 -t .   
# or 
docker run --rm --name swoole-docs  -v $(pwd)/public/:/usr/share/nginx/html/  -p 9503:80  nginx:1.25-alpine
# or 
python3 -m http.serve 9503 -d .

浏览器打开: http://0.0.0.0:9503即可预览

实时预览 修改后的文档

文档工具使用的是 Docsify docsifyjs-cli

npm i docsify-cli -g
# or
npm i docsify-cli -g --registry=https://registry.npmmirror.com

cd docs/public

docsify start  .

浏览器打开: http://0.0.0.0:4000 即可预览

Request for English Version of Official Documentation

Dear Swoole team,

I would like to request an English version of the official documentation. Currently, the documentation is not available in English, and it would be immensely helpful for non-Chinese-speaking users like me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.