Blank php page
Posted: Fri Dec 05, 2008 6:23 pm
Hello,
I'm experiencing a problem with a php page on a website. The page is coming up blank & I've searched and searched for the problemn but can't seem to find the cause. Here's the code:
---------------------------------------------------------------
<?php
require_once('/includes/getid3/getid3.php');
require_once('/includes/code/functions.php');
$DAYS_TO_DOWNLOAD = 1;
$CanRate = 1;
$CanDownload = 1;
$dtret = GetUsersFirstTimeRated('2008_01_14');
if ($dtret != "") {
#User has rated before
$CanRate = 0;
$days = (strtotime(date("m/d/Y H:i:s")) - strtotime($dtret)) / (60 * 60 * 24);
if ($days >= $DAYS_TO_DOWNLOAD) {
$CanDownload = 0;
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Weeks Available</title>
<style type="text/css">
<!--
body {
background-color: #FF0000;
background-image: url(/includes/images/bg_temp.jpg);
}
.style4 {font-size: large}
a:link {
color: #FF0000;
}
a:visited {
color: #FF0000;
}
a:hover {
color: #CCCCCC;
}
.style5 {font-size: medium}
.style6 {color: #FFFFFF}
.class1 A:link {color: #FFFFFF}
.class1 A:visited {color: #FFFFFF}
.class1 A:active {color: #FFFFFF}
.class1 A:hover {text-decoration: underline; color: red;}
-->
</style></head>
<body>
<table width="500" height="379" border="3" align="center" bordercolor="#000000">
<tr>
<td bordercolor="#FF0000" background="/includes/images/bg2_temp.jpg">
<div align="right"><span class="style5"><span class="class1"><a href="SearchFiles.php">Search for Artist</a></span></span> </div>
<BR>
<div align="center"><span class="style2"><span class="style4">
<?php
#Get list of folders starting with 2(weekly folders)
@$d = dir(".");
if ($d) {
while($entry=$d->read()) {
if ($entry[0] == "2") {
$items[] = $entry;
}
}
$d->close();
sort($items);
}
$i = sizeof($items)-1;
while ($i >= 0) {
$dirname = $items[$i];
print "<a href='DisplayFiles.php?wk=" . $dirname . "'>" . GetWeekFromDirectory($dirname) . "</a><br><BR>\n";
$i--;
}
# for($i=0; $i<sizeof($items); $i++) {
# $dirname = $items[$i];
# print "<a href='DisplayFiles.php?wk=" . $dirname . "'>" . GetWeekFromDirectory($dirname) . "</a><br><BR>\n";
#
# }
?>
</span></div></td>
</tr>
</table>
<!--<a href="/logout.htm">Logout</a>-->
<?php
echo "<BR> $CanRate : $CanDownload";
?>
</body>
</html>
---------------------------------------------------------------
Can anyone help please?
Thanks in advance
Van
I'm experiencing a problem with a php page on a website. The page is coming up blank & I've searched and searched for the problemn but can't seem to find the cause. Here's the code:
---------------------------------------------------------------
<?php
require_once('/includes/getid3/getid3.php');
require_once('/includes/code/functions.php');
$DAYS_TO_DOWNLOAD = 1;
$CanRate = 1;
$CanDownload = 1;
$dtret = GetUsersFirstTimeRated('2008_01_14');
if ($dtret != "") {
#User has rated before
$CanRate = 0;
$days = (strtotime(date("m/d/Y H:i:s")) - strtotime($dtret)) / (60 * 60 * 24);
if ($days >= $DAYS_TO_DOWNLOAD) {
$CanDownload = 0;
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Weeks Available</title>
<style type="text/css">
<!--
body {
background-color: #FF0000;
background-image: url(/includes/images/bg_temp.jpg);
}
.style4 {font-size: large}
a:link {
color: #FF0000;
}
a:visited {
color: #FF0000;
}
a:hover {
color: #CCCCCC;
}
.style5 {font-size: medium}
.style6 {color: #FFFFFF}
.class1 A:link {color: #FFFFFF}
.class1 A:visited {color: #FFFFFF}
.class1 A:active {color: #FFFFFF}
.class1 A:hover {text-decoration: underline; color: red;}
-->
</style></head>
<body>
<table width="500" height="379" border="3" align="center" bordercolor="#000000">
<tr>
<td bordercolor="#FF0000" background="/includes/images/bg2_temp.jpg">
<div align="right"><span class="style5"><span class="class1"><a href="SearchFiles.php">Search for Artist</a></span></span> </div>
<BR>
<div align="center"><span class="style2"><span class="style4">
<?php
#Get list of folders starting with 2(weekly folders)
@$d = dir(".");
if ($d) {
while($entry=$d->read()) {
if ($entry[0] == "2") {
$items[] = $entry;
}
}
$d->close();
sort($items);
}
$i = sizeof($items)-1;
while ($i >= 0) {
$dirname = $items[$i];
print "<a href='DisplayFiles.php?wk=" . $dirname . "'>" . GetWeekFromDirectory($dirname) . "</a><br><BR>\n";
$i--;
}
# for($i=0; $i<sizeof($items); $i++) {
# $dirname = $items[$i];
# print "<a href='DisplayFiles.php?wk=" . $dirname . "'>" . GetWeekFromDirectory($dirname) . "</a><br><BR>\n";
#
# }
?>
</span></div></td>
</tr>
</table>
<!--<a href="/logout.htm">Logout</a>-->
<?php
echo "<BR> $CanRate : $CanDownload";
?>
</body>
</html>
---------------------------------------------------------------
Can anyone help please?
Thanks in advance
Van