Home | Store | osCommerce Tutorials

osCommerce application_top.php File

For osCommerce shop owners studying the file structure, the osCommerce homepage (index.php) should be the first file they open. After they open they osCommerce homepage, the first line of code they see should be:

require ('includes/application_top.php');

If they go on studying the codes of osCommerce homepage, they will find many variables, strange functions and strange names, for example:

  • $category_depth,
  • $cPath,
  • tep_db_query,
  • DIR_WS_LANGUAGES,
  • $language,
  • FILENAME_DEFAULT,
  • DIR_WS_INCLUDES,
  • etc.....

Then they begins to realize that the values of variables, the strange functions and strange names should come from the application_top.php file.

The osCommerce application_top.php file is a very important file. You may consider the application_top.php file as a booting system of the osCommerce shop. It will load up all necessary files before displaying the osCommerce web pages.

If all actions of the application_top.php are shown or listed on the screen, like the software installation process. The screen will be flashing something like:

accessing osCommerce homepage.....
loading application-top.php......
Please wait.....
The application_top.php file is now loading up all necessary files.....
It may take a few seconds.....
...............................................................
...............................................................
require configure.php.....
DIR_WS_IMAGES defined successfully.....
DIR_WS_INCLUDES defined successfully.....
DIR_WS_BOXES defined successfully.....
...............................................................
...............................................................
require filenames.php.....
FILENAME_ACCOUNT file defined successfully.....
FILENAME_DEFAULT file defined successfully.....
FILENAME_NEW_PRODUCTS file defined successfully.....
...............................................................
...............................................................
require MySQL database_tables.php to define tables.....
TABLE_CATEGORIES defined successfully.....
TABLE_CATEGORIES_DESCRIPTION defined successfully.....
TABLE_PRODUCTS defined successfully.....
...............................................................
...............................................................
require database.php to define MySQL custom functions
tep_db_connect() function loaded up....
tep_db_query() function loaded up....
tep_db_perform() function loaded up....
defining general functions now.....
require genera.php...
require html_output.php
...............................................................
...............................................................
...............................................................
...............................................................
The application_top.php loaded up all required files successfully...
Ready to load up the osCommerce webpage now...
Done!

Of course, the speed of most webserver and Internet connectivity nowadays are very fast, the booting up or loading time of the osCommerce application_top.php only take a few milliseconds. Therefore your visitors should not notice the loading or waiting time.

The following diagram shows some of the files inserting into the osCommerce application_top.php:

osCommerce application_top.php

Therefore the application_top.php file will load up or boot up all variables and functions ready to use by the osCommerce file.