User Login
Latest Technology Articles
- A New Dimension of PCinvent Group Business Management
- Object's assignment, storage & grabage
- C# Mutliple Dimension Syntax
- Small Business System Diagram
- C# Desktop HTTP Post Method to Web
- PHP, Java & C# Documentation Compile
- C# to Open Firefox and go to a URL
- c++ 8 Queens Chessboard Placement in One Dimension
- My Old C++ Pointer Homework
- Simple C# Code to Open and Select File in WinForm
| Use Existing Joomla Configuration in External PHP file |
|
|
| Wednesday, 25 June 2008 | |
|
Sometimes you may need to write an external Php file in stead of working in Joomla files. Outside the Joomla Framework, we can not use Joomla DB libraries, such as Global object $db, loadResult(), loadResultArray, loadAssocList, loadRow() and etc. In this case, we can use the custom PHP code plugin to write the code right in the Joomla content page. Or you can try what I do here: Include Joomla configuration and write your own MySQL queries in external php file......
Joomla Configuration
If you open configuration.php, you will see that all variables inside are under the class JConfig().
Joomla page Suppose we have a Joomla page called "jm_page.php" in jm_page.php, I tired to POST a request variable of $user_id from "jm_page.php" to external php file called "external.php".
External Page
In the code I wrote below, the objective is to use Jconfig Class without re-giving Database connection strings which were already defined in Joomla Configuration page.
How to read $jconfig->host?
Comments (0)
![]() Write comment
Tags: Technology Programming Use Existing Joomla Configuration in External PHP file Joomla external PHP external PHP JConfig() JConfig joomla 1.5 |
|
| Last Updated ( Thursday, 26 June 2008 ) |
| < Prev | Next > |
|---|




