PHP Car RentalUser Manual Visit PHP Car Rental →
Getting Started

Folder and file structure

The script uses a small, readable structure shared with other NetArt Media scripts. Knowing where things live makes customizing easy.

Top level

PathPurpose
index.phpFront controller: loads the classes and shows the requested page or module.
config.phpDatabase access and basic settings.
include/Core classes and helpers (see below).
extensions/One file per website module: home, cars, car, booking, contact, faq, news, login, register, account, payment ... Sections of "My account" are in extensions/account/.
templates/modern/The website template: template.html, CSS and JavaScript.
languages/Interface texts of the website: en.php, es.php.
ADMIN/The admin panel.
uploaded_images/, thumbnails/Car photos, logo and other uploads (must be writable).
install/Web installer and SQL dump. Delete after installing.
.htaccessURL rewriting rules for SEO-friendly addresses.

The include folder

FileWhat it does
DatabasePDO.class.phpDatabase class used in all scripts of the family.
PageController.class.phpRouting: ?page=slug shows a CMS page, ?mod=name runs extensions/name.php.
PageModel.class.phpQueries for pages and settings.
TemplateEngine.class.phpFills the template tags such as <site menu/> and {{text_key}}.
CarModel.class.phpCar search, prices, availability, bookings, publishing.
Payments.class.phpStripe Checkout, PayPal Orders and bank transfer.
SiteUser.class.phpWebsite users: login, registration, password reset.
helpers.phpLinks, texts, settings, formatting, e-mail, CSRF.
ajax_*.phpAI generator, AI search, live price and favorites endpoints.
stripe_webhook.phpStripe webhook address.

The ADMIN folder

Each admin page is one file in ADMIN/<category>/<action>.php, listed in ADMIN/pages_structure.php, which builds the menu and the permissions. Shared classes are in ADMIN/include/ and the interface texts in ADMIN/en.php and ADMIN/es.php.

Last updated