php quick fix

This commit is contained in:
Aliberk Sandıkçı 2023-05-11 16:29:20 +03:00
parent 9c36460e66
commit 7593d693f1
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@
<!-- CSS Files -->
<?php
$dir = new DirectoryIterator("assets/css");
$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT']."/assets/css");
foreach ($dir as $file) {
if ((!$file->isDot()) && str_ends_with($file, ".css")) {
echo '<link rel="stylesheet" href="/assets/css/' . $file . '">' . PHP_EOL . ' ';
@ -58,7 +58,7 @@
<?php
$dir = new DirectoryIterator("assets/js");
$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT']."/assets/js");
foreach ($dir as $file) {
if ((!$file->isDot()) && str_ends_with($file, ".js") && $file != "jquery.js") {
echo '<script src="/assets/js/' . $file . '"></script>' . PHP_EOL . ' ';

View file

@ -13,7 +13,7 @@
<!-- CSS Files -->
<?php
$dir = new DirectoryIterator("assets/css");
$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT']."/assets/css");
foreach ($dir as $file) {
if ((!$file->isDot()) && str_ends_with($file, ".css")) {
echo '<link rel="stylesheet" href="/assets/css/' . $file . '">' . PHP_EOL . ' ';
@ -39,7 +39,7 @@
</div>
<?php
$dir = new DirectoryIterator("assets/js");
$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT']."/assets/js");
foreach ($dir as $file) {
if ((!$file->isDot()) && str_ends_with($file, ".js") && $file != "jquery.js") {
echo '<script src="/assets/js/' . $file . '"></script>' . PHP_EOL . ' ';