I am new at joomla code understanding and trying to understand from scratch.
I think this may also help other new comer at joomla 1.5
Small explanation from any joomla development expert will works a lot.
First from first,
Any body please explain in short,
define( '_JEXEC', 1 );
What is the importence of _JEXEC
Thanks a lot
Trying to understand Joomla! 1.5 codes from scratch
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Trying to understand Joomla! 1.5 codes from scratch
Sukalyan Banga
Re: Trying to understand Joomla! 1.5 codes from scratch
The _JEXEC variable is used for source code protection.
The variable is set when the site is initialized.
In several important files there is a check for this variable to be set to 1. If it is not set, the application is not initialized.
For example if you approach the template file (yoursite.com/templates/template/index.php) directly in your browser, it would give a notice that the file cannot be accessed directly.
This way files cannot be accessed directly but only from within the application.
The variable is set when the site is initialized.
In several important files there is a check for this variable to be set to 1. If it is not set, the application is not initialized.
For example if you approach the template file (yoursite.com/templates/template/index.php) directly in your browser, it would give a notice that the file cannot be accessed directly.
This way files cannot be accessed directly but only from within the application.
- moijafcor
- Joomla! Apprentice
- Posts: 6
- Joined: Thu Mar 02, 2006 9:41 am
- Location: Santo Domingo, Dominican Republic
- Contact:
Re: Trying to understand Joomla! 1.5 codes from scratch
_JEXEC_ is a constant initialized in order prevent unauthorized access (inclusions) to package' files. As MvBrakel said you find it everywhere in Joomla!
Nicht mehr!
Los acentos en castellano omitidos intencionalmente. | Les accents et les signes en français omis intentionnellement.
http://bio.moisesjafet.com
Los acentos en castellano omitidos intencionalmente. | Les accents et les signes en français omis intentionnellement.
http://bio.moisesjafet.com
- moijafcor
- Joomla! Apprentice
- Posts: 6
- Joined: Thu Mar 02, 2006 9:41 am
- Location: Santo Domingo, Dominican Republic
- Contact:
Re: Trying to understand Joomla! 1.5 codes from scratch
Please note Joomla! also feature the JPATH_BASE constant, "to ensure this file is within the rest of the framework". Two different approaches, same result.
Greetings.
Greetings.
Nicht mehr!
Los acentos en castellano omitidos intencionalmente. | Les accents et les signes en français omis intentionnellement.
http://bio.moisesjafet.com
Los acentos en castellano omitidos intencionalmente. | Les accents et les signes en français omis intentionnellement.
http://bio.moisesjafet.com
Re: Trying to understand Joomla! 1.5 codes from scratch
Thanks to all, Now I moving towards next step.
Sukalyan Banga