1

I'm having difficulties when trying to implement the example given on https://docs.joomla.org/Framework:Creating_a_Stand-alone_Application#Examples

I'm trying to do the first example and I'm getting an error:

Fatal error: require(): Failed opening required '../libraries/import.php' (include_path='.;C:\php\pear') in C:\AppServ\www\framework\examples\hello.php on line 5

define('_JEXEC', 1); define('JPATH_BASE', dirname(FILE));

require '../libraries/import.php';

class HelloWorld extends JApplicationCli { public function execute() { $this->out('Hello World'); } }

JApplicationCli::getInstance('HelloWorld')->execute();

I came to check the files and there is no libraries folder or import.php file. Both composer and the framework are installed. Any ideas?

1

That doc page references a dead version of the project (joomla/joomla-framework which hasn't seen activity for a half-decade or more) which is a good indication that the rest of it is outdated as well. The current project files are at https://github.com/joomla-framework and the official site is https://framework.joomla.org

For a current example application, try looking at joomla/framework.joomla.org on github and see if that can help you get started.

| improve this answer | |
  • That's what i thought. I didn't see any indications that it was dead haha. Thank you! – Thiago Guimarães Feb 19 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.