English 中文(简体)
我如何将外部图书馆列入《国际公认准则》?
原标题:How do I include external Libraries in CodeIgniter?

I m New tocodeigniter, and I m seeking to Integrat amazon s FPS into my page. 有一些图书馆和模型,与亚马孙基金会连接,我需要包括这些图书馆和模型,以便发出适当的电话。

我如何把他们列入《刑法》?

I tried placing the entire Amazon folder inside the system/libraries directory, and then tried including libraries with $this->load->library( Amazon/FPS/Client ); However, I run into problems with the relative path there, because Client.php contains the statement require_once ( Amazon/FPS/Interface.php ); ... which is in the same folder.

必须找到更好的办法,才能帮助任何人?

谢谢!

问题回答

没有任何阻止你直接包含类并按照你在普通的PHP设置中的方式进行工作。如果在PHP中可以工作,则在CodeIgniter中也可以工作。

include(APPPATH. libraries/Amazon/FPS/Interface.php );

a3m的Peng Kong用插件的方式有一个不错的解决方法: http://code.google.com/p/a3m/

示例twitter_pi.php

require_once(APPPATH. modules/account/plugins/libraries/jmathai-twitter-async/EpiCurl.php ); require_once(APPPATH. modules/account/plugins/libraries/jmathai-twitter-async/EpiOAuth.php ); require_once(APPPATH. modules/account/plugins/libraries/jmathai-twitter-async/EpiTwitter.php );

/* End of file twitter_pi.php / / Location: ./system/application/modules/account/plugins/twitter_pi.php */

在控制器中

$this->load->plugin( twitter ); $twitterObj = new EpiTwitter($this->config->item( twitter_consumer_key ), $this->config->item( twitter_consumer_secret ));

Codeigniter 2.0中有一个问题,那就是没有插件。

Oh yes codeigniter is nice and has also support for many librarys please have a look here http://www.haughin.com/code/ Include the Amazon service like this $this->load->library( s3 );

@user3526 Note that $this->load->library( classname ) will create an instance of that loaded class, not just file (class) include.





相关问题
Mount windows shared drive to MWAA in bootscript

In MWAA startup script sudo yum install samba-client cifs-utils -y sudo mount.cifs //dev/test/drop /mnt/dev/test-o username=testuser,password= pwd ,domain=XX Executing above commonds giving error - ...

How to get Amazon Seller Central orders programmatically?

We have been manually been keying Amazon orders into our system and would like to automate it. However, I can t seem to figure out how to go about it. Their documentation is barely there. There is: ...

Using a CDN like Amazon S3 to control access to media

I want to use Amazon S3/CloudFront to store flash files. These files must be private as they will be accessed by members. This will be done by storing each file with a link to Amazon using a mysql ...

unable to connect to database on AWS

actually I have my website build with Joomla hosted on hostmonster but all Joomla website need a database support to run this database is on AWS configuration files need to be updated for that I ...

Using EC2 Load Balancing with Existing Wordpress Blog

I currently have a virtual dedicated server through Media Temple that I use to run several high traffic Wordpress blogs. Both tend to receive sudden StumbleUpon traffic surges that (I m assuming) ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

热门标签