I have this script: and when I moved it to the remote server a blank page appears, this is the only pag of the site that gives this and I do not understand why. In place is everything ok, does not give any error and if I see the source code of the page tb does not appear anything. All white
<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
require_once('conn.php');
spl_autoload_register(function($class) {
require_once ('Classes/'.$class.'.php');
});
$database = new DB($db);
?>
<!DOCTYPE html>
<html>
<head>
<title>Pics Upload</title>
<style>
* {
box-sizing:border-box;
margin: 0;
}
div {
font-size: 0;
}
#errors {
color: red;
font-size: 16px;
}
p {
font-size: 13px;
text-align: center;
background-color: yellow;
}
.image {
width: 33%;
font-size: 0;
display: inline-block;
}
.image img {
width: 100%;
border: 2px solid yellow;
}
</style>
</head>
<body>
<div id ="wrapper">
<h1>Display all images from Database</h1>
<br>
<a href="index.php">Home</a>
<br>
<a href="displayAll.php">Display all images from database</a>
<br>
<a href="mostVoted.php">Display the 3 most voted images</a>
<br>
<a href="imagesFolder.php">Display images from folder</a>
<form action="" method="POST">
<label><br><br>Insert how many random images you want to see<br><input type="text" name="numRandom"></label><br>
<input type="submit">
</form>
<?php
setlocale(LC_ALL, 'pt_BR.utf8', 'Portuguese_Brazil');
date_default_timezone_set('Europe/Lisbon');
echo '<br><br>Total Rows (images) in Database: ' .$database->fetchRowCount(). '<br><br>';
if (isset($_POST['numRandom'])) {
$numOfRandom = $_POST['numRandom'];
if ($database->inputRandomCheck($numOfRandom)) {
$results = $database->selectRandomImage($numOfRandom);
echo 'Total random images to display: ' .$numOfRandom. '<br><br>';
echo '<pre>', print_r($results), '</pre>';
$uppercaseDay = ucfirst(gmstrftime('%A'));
?>
<div id="imgWrapper">
<?php
for ($i=0; $i<count($results); $i++) {
?>
<div class="image">
<p><?php echo $results[$i]->image_name;
echo '<br>' .strftime($uppercaseDay.', %d/%b/%Y - %H:%M:%S', $results[$i]->uploaded); ?>
</p>
<p>Total votes = <?php echo $results[$i]->vote; ?></p>
<a href="<?php echo $results[$i]->link; ?>" target="_blank">
<img src="<?php echo $results[$i]->image_path; ?>"></a>
</div>
</div>
<?php }
}
else if (!empty($database->errors())){
foreach ($database->errors() as $error) {
echo '<div id="errors">' .$error. '</div>';
}
}
}
else {
echo 'Total random images to display:<br><br><br>';
}
?>
</div>
</body>
</html>