显然,我的最后一个问题太模糊了,尽管它是相当直接的。
我正在尝试使用Embed.ly的API来嵌入一些东西,例如,这里显示的一些东西。https://github.com/embedly/embedly-php/blob/master/README.rst
我将整个Embedly.php源文件放在我的工作目录中。
但是,当我的头文件中包含以下内容时:
<?php
//require_once('Embedly/src/Embedly/Embedly.php'); // if using pear
require_once('./Embedly.php'); // if using source
$api = new Embedly\Embedly(array('user_agent' => 'Mozilla/5.0 (compatible; mytestapp/1.0)'));
?>在我的主页上还有以下内容:
<?php
$objs = $api->oembed(array(
'urls' => array(
'http://www.youtube.com/watch?v=sPbJ4Z5D-n4&feature=topvideos',
'http://twitpic.com/3yr7hk'
)
));
?>我得到以下错误:
(!)致命错误:在第259行调用C:\wamp\www\Embedly.php中未定义的函数Embedly\curl_init()
发布于 2011-06-09 02:35:56
看起来curl没有安装或启用。
如果你在你自己的服务器上(假设类似于ubuntu服务器),一个简单的sudo apt-get install php5-curl就能解决这个问题。
否则,您可能需要联系您的主机提供商。
发布于 2011-06-09 02:44:28
这是从一个forum上得到的,看起来是合法的:
关闭WAMP (如果要关闭WAMP(如果是您的php版本)\ extension=php_curl.dll
https://stackoverflow.com/questions/6283380
复制相似问题