Try: ca/tecreations/ViewFile.php
<?php
//die($_SERVER['DOCUMENT_ROOT']);
require_once $_SERVER['DOCUMENT_ROOT'] . "/tec_SiteRoot.php";
include_once $DOCROOT . $TEC_PREFIX_DIR . "start_html.php";
?>
<link rel="stylesheet" type="text/css" href="/ca/tecreations/style.css">
</head>
<body>
<?php
include_once $DOCROOT . $TEC_PREFIX_DIR . "header_start.php";
include_once $DOCROOT . $TEC_PREFIX_DIR . "menu/userMenu.php";
include_once $DOCROOT . $TEC_PREFIX_DIR . "menu/contact.php";
include_once $DOCROOT . $TEC_PREFIX_DIR . "header_stop.php";
?>
<div class="padded">
<?php
$subPath = substr(getcwd(),STRLEN($DOCROOT));
$files = scandir(getcwd(),SCANDIR_SORT_ASCENDING);
for($i = 0; $i < count($files); $i++) {
if (!isDot($files[$i]) && !isDotDot($files[$i])) {
if (isTextFile($files[$i])) {
if (isPHP($files[$i])) {
if ($files[$i] != "List.php") {
print("<p><a href='/" . $TEC_PREFIX_DIR . "ViewFile.php?path=$subPath/$files[$i]'>$files[$i]</a> -- <a href='/$subPath/" . $files[$i] . "'>View Online</a></p>\n");
} else {
print("<p><a href='/" . $TEC_PREFIX_DIR . "ViewFile.php?path=$subPath/$files[$i]'>$files[$i]</a></p>\n");
}
} else {
print("<p><a href='/" . $TEC_PREFIX_DIR . "ViewFile.php?path=$subPath/$files[$i]'>$files[$i]</a></p>\n");
}
} else if (isImage($DOCROOT . $subPath . "/" . $files[$i])) {
print("<p><a href='$files[$i]'>$files[$i]</a></p>\n");
} else {
print("<p><a href='$files[$i]'>$files[$i]</a></p>\n");
}
}
}
?>
</div>
<?php
require_once $DOCROOT . $TEC_PREFIX_DIR . "footer.php";