]> git.bochard.net Git - mysite.git/commitdiff
somefixe
authorbochard <mail@tenkyuu.dev>
Fri, 18 Apr 2025 13:18:55 +0000 (21:18 +0800)
committerbochard <mail@tenkyuu.dev>
Fri, 18 Apr 2025 13:18:55 +0000 (21:18 +0800)
404.php
filesystem.php [new file with mode: 0644]
includes/header.php
index.php

diff --git a/404.php b/404.php
index 4653d5319f2a8e022a7e50ed0f88af4e89afa22e..7d16889994ef5e0cc2e26072f8c6babc805ec85a 100755 (executable)
--- a/404.php
+++ b/404.php
@@ -12,7 +12,7 @@
 </head>
 <body>
   
-  <?php include '/includes/header.php';?>
+  <?php include './includes/header.php';?>
 
   <main>
     <p>There's no such link like that on my site. are you looking for easter eggs?!</p>
@@ -20,7 +20,7 @@
   </main>
   
 
-  <?php include '/include/footer.php';?>
+  <?php include './includes/footer.php';?>
   
 </body>
 </html>
\ No newline at end of file
diff --git a/filesystem.php b/filesystem.php
new file mode 100644 (file)
index 0000000..923e532
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+function displayDirectory($dir, $level = 0) {
+    // Open the directory
+    if ($handle = opendir($dir)) {
+        // Loop through the directory contents
+        while (false !== ($entry = readdir($handle))) {
+            // Skip the current and parent directory entries
+            if ($entry != "." && $entry != "..") {
+                // Indent based on the level of depth
+                echo str_repeat("&nbsp;", $level * 4); // 4 spaces for each level
+                echo "<li>$entry</li>";
+
+                // If the entry is a directory, recursively call this function
+                if (is_dir($dir . '/' . $entry)) {
+                    echo "<ul>";
+                    displayDirectory($dir . '/' . $entry, $level + 1);
+                    echo "</ul>";
+                }
+            }
+        }
+        closedir($handle);
+    }
+}
+
+// Start displaying from the current directory
+echo "<h1>Filesystem Structure</h1>";
+echo "<ul>";
+displayDirectory(__DIR__); // Use __DIR__ to start from the current directory
+echo "</ul>";
+?>
index 82db42cee353f091877d03993728360a560acd16..a63c9dd0caf00adc76ef42471d46090522c4ff29 100755 (executable)
@@ -1,6 +1,6 @@
 <audio id="bg-music" src="/audios/background/rejectedworld.mp3" controls loop></audio>
 <header>
-  <img src=".images/gifs/doraemon.gif" alt="doraemon hello gif" width="100">
+  <img src="/images/gifs/doraemon.gif" alt="doraemon hello gif" width="100">
   <img src="/images/gifs/welcomemovetree.gif" alt="tree with welcome text gif" width="300">
   <h1>welcome to my website!</h1>
   <img src="/images/gifs/homepageburning.gif" alt="under construction text gif" width="300">
index 30770285a32dba21a1c160050a782a980edb1175..b9b4f9173a453f9d41ccbc3c095c5bf275373471 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -71,7 +71,7 @@
     </section>\r
   </main>\r
 \r
-  <?php include '/includes/footer.php';?>\r
+  <?php include './includes/footer.php';?>\r
   \r
 </body>\r
 </html>
\ No newline at end of file