【发布时间】:2011-06-08 18:22:19
【问题描述】:
显然我的最后一个问题太模糊了,尽管它很简单。
我正在尝试使用 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'
)
));
?>
我收到以下错误:
( ! ) 致命错误:在 C:\wamp\www\Embedly.php 第 259 行调用未定义函数 Embedly\curl_init()
【问题讨论】:
-
如果启用了 curl,请检查您的 php.ini 或 phpinfo()。
-
我正在使用 WAMP,但在这些文件中都找不到任何关于 curl 的信息。也许我找错地方了?