feed-reader-central/src/start.php

34 lines
628 B
PHP
Raw Normal View History

2024-04-04 23:15:58 +00:00
<?php
spl_autoload_register(function ($class) {
$file = implode(DIRECTORY_SEPARATOR, [ __DIR__, 'lib', "$class.php" ]);
if (file_exists($file)) {
require $file;
return true;
}
return false;
});
2024-04-04 23:15:58 +00:00
require 'user-config.php';
2024-04-04 23:15:58 +00:00
Data::ensureDb();
/**
* Render the page title
* @param string $title The title of the page being displayed
*/
function page_head(string $title): void {
?><!DOCTYPE html>
<html lang="en">
<head>
<title><?=$title?> | Feed Reader Central</title>
</head>
<body><?php
}
/**
* Render the end of the page
*/
function page_foot(): void {
?></body></html><?php
}