xoops forums

iver2435

Just popping in
Posted on: 2006/1/20 5:52
iver2435
iver2435 (Show more)
Just popping in
Posts: 10
Since: 2006/1/19
#1

Constant initializations, where are they?

I will admit, I am a noob when it comes to PHP, but I'm picking up speed very quickly.

I just have one question....I've been looking at some of the XOOPS source code just trying to get a feel for the syntax of PHP and I have noticed that there are alot of constants defined "somewhere".

As an example, I was poking around in the "common.php" file and saw this:

if (!defined("XOOPS_MAINFILE_INCLUDED")) {
exit();
} else {
// rest of code goes here
}

Mainly what I want to know is, where is XOOPS_MAINFILE_INCLUDED defined?

Also, as an alternate question....Is there any source of info out there about the XOOPS API and how all the files are related?

Thanks for the help fellas!

iver2435

Just popping in
Posted on: 2006/1/20 6:12
iver2435
iver2435 (Show more)
Just popping in
Posts: 10
Since: 2006/1/19
#2

Re: Constant initializations, where are they?

After poking around further, I found that constant initialization in mainfile.php!

I would still like to know if there is any place to get a general feel for the "flow" of a XOOPS page loading up...

Like right now I have the impression from following all the
require "mainfile.php"'s and require_once's that mainfile.php gets loaded first, which then includes common.php, which then pulls in basically everything else that is needed by xoops...

If I'm right or horribly wrong, I'd like to know either way