s3
This commit is contained in:
22
.hta_404.php
22
.hta_404.php
@@ -18,17 +18,17 @@
|
||||
$querySlug = explode('.', $slug)[0];
|
||||
$fileName = $slug;
|
||||
|
||||
function saveHtmlFile($fileName, $headerContent, $pageContent){
|
||||
$footerContent = file_get_contents('./.hta_footer.php');
|
||||
$totalPageContent = $headerContent . $pageContent . $footerContent;
|
||||
$filePath = __DIR__ . '/' . $fileName;
|
||||
// function saveHtmlFile($fileName, $headerContent, $pageContent){
|
||||
// $footerContent = file_get_contents('./.hta_footer.php');
|
||||
// $totalPageContent = $headerContent . $pageContent . $footerContent;
|
||||
// $filePath = __DIR__ . '/' . $fileName;
|
||||
|
||||
if (file_put_contents($filePath, $totalPageContent)) {
|
||||
// echo "<p class='text-success'>Page saved successfully at $filePath.</p>";
|
||||
} else {
|
||||
// echo "<p class='text-danger'>Failed to save the page.</p>";
|
||||
}
|
||||
}
|
||||
// if (file_put_contents($filePath, $totalPageContent)) {
|
||||
// echo "<p class='text-success'>Page saved successfully at $filePath.</p>";
|
||||
// } else {
|
||||
// echo "<p class='text-danger'>Failed to save the page.</p>";
|
||||
// }
|
||||
// }
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>';
|
||||
|
||||
// Call the function to save the HTML file
|
||||
saveHtmlFile($fileName, $headerContent, $pageContent);
|
||||
// saveHtmlFile($fileName, $headerContent, $pageContent);
|
||||
} else {
|
||||
$pageContent = '
|
||||
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 100px 0; ">
|
||||
|
||||
Reference in New Issue
Block a user