Created
July 20, 2012 09:04
-
-
Save clippit/3149738 to your computer and use it in GitHub Desktop.
a quite simple helloworld webapp with joomla platform 12.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// We are a valid Joomla entry point. | |
define('_JEXEC', 1); | |
// Setup the base path related constant. | |
define('JPATH_BASE', dirname(__FILE__)); | |
define('JPATH_SITE', JPATH_BASE); | |
define('JPATH_LIBRARIES', dirname(dirname(__FILE__)) . '/joomla/libraries'); | |
require JPATH_LIBRARIES.'/import.php'; | |
class Hello extends JApplicationWeb | |
{ | |
protected function doExecute() | |
{ | |
$this->setBody('Hello World!'); | |
} | |
} | |
$app = JApplicationWeb::getInstance('Hello'); | |
JFactory::$application = $app; | |
$app->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment