|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2023-11-10 (26 days ago) ||Not yet rated by the users||Total: 83 This week: 1||All time: 9,990 This week: 363|
This package can be used to create database-driven Web sites.
It can load a configuration file in JSON format that defines several details of the pages of the site like the type of database to use, site domain, copyright, paths of different types of files, etc...
The main class can perform several types of general-purpose functions that many sites need like page headers, banners, footers, etc...
For database access, it supports MySQL using the MySQLi extension.
There are several ways to install this project
Download The ZIP File
Download the ZIP file from GitHub. Expand it into the /var/www dirctory that Apache2 creates.
In my servers I have /var/www and then have my virtual hosts off that directory.
That way the directory created when you unzip the download is easily available to all of my virtual hosts.
If you have Apache or Nginx installed then you should made your project root somewhere within your DocumentRoot ('/var/www/html' for Apache2 on Ubuntu). Or if you want to make a seperate Apache virtual host with a registered domain name you can make your new project in '/var/www'.
Create a directory
`mkdir myproject; cd myproject
`, this is your project root directory. Add the following to 'composer.json', just cut and past:
INPORTANT NOTE: you can disable the log function by either setting
` or adding
` to the mysitemap.json.
Doing either of those things will keep the SimpleSiteClass from using the logagent table to log visitors. This will also mean that some of the
example programs will not work.
First you will need to install mysql if you don't already have it. You will need to install the PHP extension for mysql.
The SimpleSiteClass code runs with PHP 8, and it may not work with older versions of PHP.
Once you have mysql and the PHP extension you can set up mysql. These examples use a database called barton with user barton. There is
a file in this directory called schema.sql. You can run it in mysql and create the table.
Now that the database is set up you can run the examples.
I have included a couple of examples to show how to use the SimpleSiteClass. They are in two seperate directories: IfComposer and IfDownloadedZip.
If you set up your directory structure as:
and used composer to create a /var/www/vendor/bartonlp/simple-site-class directory, you should use IfComposer examples.
If you downloaded the zip file from https://github.com/bartonlp/simple-site-class you should use the IfDownloadedZip directory.
In either case, from the examples directory in the downloaded location, do:
Then open your browser and enter:
Each example has links to the rest of the examples.
Note, that when running with the PHP server it does not use the apache .htaccess file.
You can run both sets of examples from a browser if you have the apache server running on your machine. The IfComposer examples should
just work. In the IfComposer directory I have a .htaccess file which has the Header set for the site loader.
The IfDownloadedZip examples need to have the includes directory, from the zip file, moved to the directory above the examples
directory. Or, you can edit the examples and change the ```__DIR__ . "/../../```, in the 'callback' function at the top of the file, to an absolute path.
Any questions can be directed to Barton Phillips at firstname.lastname@example.org
## Contact Me
Barton Phillips : email@example.com
Copyright © 2023 Barton Phillips
Project maintained by Barton Phillips
Last Modified November 10, 2023
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.