Skip to content

Instantly share code, notes, and snippets.

@clippit
Created July 20, 2012 09:04
Show Gist options
  • Save clippit/3149738 to your computer and use it in GitHub Desktop.
Save clippit/3149738 to your computer and use it in GitHub Desktop.
a quite simple helloworld webapp with joomla platform 12.1
<?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