Asset Path Debug"; echo "
Current Script: " . $_SERVER['SCRIPT_FILENAME'] . "
"; echo "Document Root: " . $_SERVER['DOCUMENT_ROOT'] . "
"; echo "Script Name: " . $_SERVER['SCRIPT_NAME'] . "
"; echo "Request URI: " . $_SERVER['REQUEST_URI'] . "
"; echo "CSS Path: " . getAssetPath('css/style.css') . "
"; echo "JS Path: " . getAssetPath('js/app.js') . "
"; echo "CSS File Exists: " . (file_exists($cssPath) ? 'YES' : 'NO') . " ($cssPath)
"; echo "JS File Exists: " . (file_exists($jsPath) ? 'YES' : 'NO') . " ($jsPath)
"; echo "";
echo "Current directory: " . getcwd() . "\n";
echo "Assets directory exists: " . (is_dir('assets') ? 'YES' : 'NO') . "\n";
echo "Public directory exists: " . (is_dir('public') ? 'YES' : 'NO') . "\n";
if (is_dir('assets')) {
echo "\nAssets directory contents:\n";
$files = scandir('assets');
foreach ($files as $file) {
if ($file !== '.' && $file !== '..') {
echo " - $file\n";
if (is_dir("assets/$file")) {
$subfiles = scandir("assets/$file");
foreach ($subfiles as $subfile) {
if ($subfile !== '.' && $subfile !== '..') {
echo " - $subfile\n";
}
}
}
}
}
}
echo "";
echo "Direct CSS: assets/css/style.css - " . (file_exists('assets/css/style.css') ? 'EXISTS' : 'NOT FOUND') . "
"; echo "Direct JS: assets/js/app.js - " . (file_exists('assets/js/app.js') ? 'EXISTS' : 'NOT FOUND') . "
"; ?>