我正在做一个毕业项目,我需要在 PHP 中启用 pthreads,因为我需要多线程。我用了a tutorial ,但我收到此错误:Fatal error class 'Thread' not found in...
。
我在网上搜索了有关如何启用 pthreads 的帮助,但没有任何帮助。我使用的是 PHP 版本 5.4.7。
最佳答案
遇到同样错误的用户已将解决方案发布到 github 上:https://github.com/krakjoe/pthreads/issues/154
简而言之,您必须将 pthreadVC2.dll 添加到 Apache 配置中……我不知道这一点,我不使用 Windows……
这应该让你排序......
关于php - “Fatal error class ' 尝试使用 PHP pthreads 时线程 ' not found in…”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18237572/