3xdoing Guestbook 2.0 is written in smarty+MYSQL. The technical languages involved include php, html, css, js, and jQuery. The entire site uses pseudo-static. Server information can be viewed in the background for message review, batch review, deletion, and batch deletion. Search and set basic website information by topic, etc. Directory structure: How to use: The front-end entry file is admin.php, and the back-end entry file is index.php. The main logical algorithms of the guestbook are in these two files. When using the smarty template, you can quickly obtain some paths and also generate some paths. Example when urlmodel is 1, for example:
Get the public folder {$__PUBLIC__}
Get the classes folder {$__CLASS__}
Get project address {$__ROOT__}
Get the current group address {$__APP__}
Example of getting the current group: /home Get the current operation address {$__URL__}
The URL of the project is basically http://your domain name/guestbook2.0/entry file/project directory/project file/key1/value1/key2/value2/keyN/valueN
Configuration file:
The configuration file is configs/config.php. The configuration information is as follows: host address, database name, database user name, database password, database character set, data table prefix, group items, separated by commas, the default group must be defined $defaultgroup, default group url mode, 1 is normal mode , 2 is compatibility mode, 3 is REWRITE mode, the default is normal mode pseudo-static, true is turned on, it must be matched with the U method { project file |U}, note that it is a large U pseudo-static:
Use of pseudo-static: Sometimes we need to use pseudo-static, for example, the url path is your domain name/guestbook2.0/entry file/project directory/project file/key1/value1.html
At this time we need to use the U method. First we need to add rewurl => array(true, "html") to the configuration file. At this time, .html will be added to the end of the path. The generated path needs to be used in the template like this { project file |U}For example, the path generated at this time is your domain name/guestbook2.0/entry file/current project directory/homepage.html
There is also how to cancel the entry file. If you do not cancel the entry file, people can tell at a glance that it is a file written by PHP. If the server supports it, we can create a .htaccess file in the root directory. The writing method is as follows
RewriteEngineOn RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ admin.php/$1 [QSA,PT,L] In this way, the path when accessing the backend can be your domain name/guestbook2. 0/admin
The urlmodel of the configuration file needs to be changed to 3. At this time, the path generated by the U method will omit the entry file.
Installation method:
Your domain name/guestbook2.0/install can be installed according to the prompts. After installation, it is best to delete the install folder for safety.
As you can see, this guestbook is written based on smarty. In line with our open source attitude, users are not allowed to encrypt and encrypt this guestbook. Secondary development can be carried out, but it must be open source and no profit is allowed from this guestbook. We sincerely hope that You can submit the BUG of this guestbook to our website, and we will make timely modifications but we do not guarantee that we will adopt your opinions. Please understand that the final interpretation right of the 3xdoing guestbook belongs to 3xdoing.
Expand