本文介绍了PHP 致命错误:“OAuth"类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上搜索了几个小时以寻找答案,但没有任何帮助.我已经安装了 PHP/Apache2/PECL/OAuth 并为 extension=oauth 编辑了 php.ini.我得到这个错误我输入php example.php"我会设置令牌和example.php中所需的一切

I searched the site for hours looking for answer and nothing helped me. I’ve installed PHP/Apache2/PECL/OAuth and edited php.ini for extension=oauth. I get this error everything I type "php example.php" I'd set the token and everything required in example.php

PHP 致命错误:在第 22 行的/home/twitter/TwitterAutoReply.php 中找不到OAuth"类

我的 php 文件是 example.php 和 TwitterAutoReply.php

My php files is example.php and TwitterAutoReply.php

https://raw.github.com/gist/820281/3073e8c81/3003e64c0403e64cfd64e64e65cfdd4c/example.php示例.phphttps://gist.github.com/raw/820281/6bf19ce84a88eedf139a44b5a/TwitterAutoReply.php"php

推荐答案

由于该错误,您没有在 php.ini 文件中导入 oauth 包.对于ubuntu,你需要安装oauth:

From the error, you're not importing the oauth package in you php.ini file.For ubuntu, you need to install oauth:

sudo pecl install oauth

然后在 php.ini 中包含 oauth 包.如果你不知道文件在哪里,你可以使用:

Then include the oauth package in your php.ini. If you don't know where the file is, you can use:

sudo find / -name "oauth.so"

使用扩展程序的路径将以下内容添加到您的 php.ini 中:

Using the path to the extension add the following to your php.ini:

extension=/path/to/oauth/package/oauth.so

重启apache并重试.

Restart apache and try again.

这篇关于PHP 致命错误:“OAuth"类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 07:54
查看更多