s1
This commit is contained in:
15
.hta_404.php
15
.hta_404.php
@@ -9,7 +9,9 @@
|
||||
|
||||
if ($urlParts[1] === 'notice') {
|
||||
$slug = $urlParts[2];
|
||||
} else {
|
||||
} elseif($urlParts[1] === 'departments'){
|
||||
$slug = $urlParts[2];
|
||||
} else{
|
||||
$slug = $urlParts[1];
|
||||
}
|
||||
|
||||
@@ -21,13 +23,12 @@
|
||||
$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);
|
||||
|
||||
Reference in New Issue
Block a user