Blank php page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vantheman
Forum Newbie
Posts: 6
Joined: Fri Dec 05, 2008 6:12 pm

Blank php page

Post by vantheman »

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>&nbsp;&nbsp;&nbsp;</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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Blank php page

Post by josh »

Did you check to make sure error_reporting is set appropriately and display_errors as well?
vantheman
Forum Newbie
Posts: 6
Joined: Fri Dec 05, 2008 6:12 pm

Re: Blank php page

Post by vantheman »

Yes.
The following error message is displayed:
--------------------------------------------------------------------
Fatal error: Call to undefined function GetUsersFirstTimeRated() in /var/www/vhosts/nervedjsemf.com/httpdocs/secure/DisplayWeeksTest.php on line 10
--------------------------------------------------------------------
I forgot to point out that, the php file with the code, resides inside the "secure" folder. The "includes" folder that this php file calls, resides 1 level up, inside the httpdocs folder. With that being said, how should the relative statement be typed?

Thanks for your response jshpro2.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Blank php page

Post by josh »

vantheman wrote:Call to undefined function GetUsersFirstTimeRated() in /var/www/vhosts/nervedjsemf.com/httpdocs/secure/DisplayWeeksTest.php on line 10
I'm going to make you guess what that means.

*hint* = http://www.google.com/search?q=undefine ... =firefox-a
Post Reply