This project contains legacy PHP code for a basic news site. The code has been partially modernized to use PDO and namespaces.
- Ensure PHP 8+ and Composer are installed.
- Clone the repository.
- Configure database credentials using environment variables:
DB_DSN– e.g.mysql:host=localhost;dbname=master_news;charset=utf8DB_USERDB_PASS
- Point the web root to this directory.
- Make sure the
xdata/andcookiefile/directories are writable by the web server.
Google AdSense is integrated via a script tag in templates/tpl.header.php. Replace ca-pub-XXXXXXXX with your publisher ID.
The project now uses prepared statements to mitigate SQL injection. User input is cast or sanitized before use.
This codebase is still largely legacy. Consider migrating templates to a modern framework and introducing automated tests.