用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3439|回复: 6
收起左侧

[HELP] codeigniter如何导入淘宝的SDK

[复制链接]
发表于 2011-11-20 16:58:26 | 显示全部楼层 |阅读模式
本帖最后由 cloudshadow 于 2011-11-20 17:44 编辑

用了$this->load->library('TopSDK');
和淘宝建议的include都报错
淘宝SDK是放在 system/libraries下的。

代码中引入
$this->load->library('TopSdk');

页面报错
Non-existent class: TopSdk

发表于 2011-11-20 17:44:55 | 显示全部楼层
就是直接include
你是怎么include的,发代码看看
 楼主| 发表于 2011-11-20 17:47:40 | 显示全部楼层
代码中include
include 'libraries/TopSdk.php';
页面报错
A PHP Error was encountered

Severity: Warning

Message: include(libraries/TopSdk.php) [function.include]: failed to open stream: No such file or directory

Filename: controllers/taobao.php

Line Number: 2
 楼主| 发表于 2011-11-20 17:49:02 | 显示全部楼层
代码中include
include 'TopSdk.php';
页面报错

Severity: Warning

Message: include(TopSdk.php) [function.include]: failed to open stream: No such file or directory

Filename: controllers/taobao.php

Line Number: 2
发表于 2011-11-20 19:06:23 | 显示全部楼层
代码问题好烦啊,
发表于 2011-11-20 19:43:04 | 显示全部楼层
att555 发表于 2011-11-20 19:06
代码问题好烦啊,

路径不对,不要把三方类库放system下面,如果要自己include,注意使用CI的常量,如FCPATH,APPPATH等,你可以打印以下看看这些常量的值看看哈
 楼主| 发表于 2011-11-20 19:43:27 | 显示全部楼层
谁能告诉我怎么弄么?

本版积分规则