English 中文(简体)
Joomla 2.5 Web Services
原标题:Joomla 2.5 Web Services

我目前正在与Joomla 2.5合作,我需要把我们的网站与其他一些应用结合起来。 我们基本上需要网络服务,但我似乎没有找到这方面的任何资源。 我可以找到关于1.5/1.6但不是2.5的信息。

任何想法?

谢谢。

最佳回答

我认识到,我必须接受某种习俗,因此,我把Slim REST框架与Joomla合并。 在以下文字中,我开始将Joomla申请列入我的发言稿:

error_reporting(0);
ini_set( display_errors ,  0 );

define(  _JEXEC , 1 );
define(  _VALID_MOS , 1 );

// Point JPATH_BASE to root directory    
define(  JPATH_BASE , substr($_SERVER[ SCRIPT_FILENAME ], 0, strrpos($_SERVER[ SCRIPT_FILENAME ],  /administrator )));    
define(  DS , DIRECTORY_SEPARATOR );

// Include the Slim REST framework
require_once ( JPATH_BASE .DS. libraries/slim/Slim.php  );
// Include the Joomla framework
require_once ( JPATH_BASE .DS. includes .DS. defines.php  );
require_once ( JPATH_BASE .DS. includes .DS. framework.php  );    

$application = & JFactory::getApplication( site );
$application->initialise();

$app = new Slim();
$app->get( /resource/car/:id ,  getCar );  
$app->put( /resource/car/:id ,  updateCar );
$app->run();

I can now use the Joomla APIs in my code for security, data access etc.

问题回答

自Joomla以来 1.6 无需启动网络服务。

因此,在配置网页上没有相应的选择。





相关问题
IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

ASP.net web services

I am using a web service which sets the Thread.CurrentPrincipal object while logging in and soon later when another webmethod of the same web service accesses Thread.CurrentPrincipal, its different/...

Unity Container Disposing and XML Web Service

I am registering some wrapers over un-managed objects in container. How can I dispose of them at the end of the container s lifetime? Please bear in mind I have an XML Web service.

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

热门标签