As we learned in Part 1 of this article, how to load SLIM Framework in our joomla 3.4 project and how to instantiate SLIM framework, directory structure explained in part 1 of this tutorial, in this part we will create index.php file flowing our directory structure.
Let's startcreate index.php in /your_project/api/v1/index.php . and paste bellow code, hey don't get confused by seeing this messy line of code , don't worry i will explain each line.
Let's startcreate index.php in /your_project/api/v1/index.php . and paste bellow code, hey don't get confused by seeing this messy line of code , don't worry i will explain each line.
- <?php
- define('_JEXEC', 1);
- define('_API', 1);
- define('JPATH_BASE', dirname(dirname(dirname(__FILE__))));
- // Include the Joomla framework
- require_once JPATH_BASE . '/includes/defines.php';
- require_once JPATH_BASE . '/includes/framework.php';
FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP quetions and answers, to instantly resolve your various language queries.
Apart from this, If you have any html language issue, you can post at HTML developer forum and get instantly resolved it from highly experienced FindNerd community members.
Apart from this, If you have any html language issue, you can post at HTML developer forum and get instantly resolved it from highly experienced FindNerd community members.