Fatal error: Class 'PDO' not found in /home/bluminat/public_html/donate/inc/page.viewall.php on line 10
文件的代码:
<center>
<div class="panel panel-default" style="width: 600px;">
<div class="panel-heading">Recent Donations</div>
<div class="panel-body"><p>
<?php
ini_set('display_errors','On');
error_reporting(-1);
require_once('./inc/pagination.php');
try{
$dbh = new PDO('mysql:host='.SQL_HOST.';dbname='.SQL_DB, SQL_USER, SQL_PASS);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
print "Error!: " . $e->getMessage() . "<br/>";
}
if(isset($_GET['page'])){$page = $_GET['page'];}else{$page = 1;}
$options = array( 'results_per_page' => 5, 'url' => '?page=*VAR*', 'db_handle' => $dbh);
try{
$paginate = new pagination($page, 'SELECT * FROM donations_list ORDER BY date DESC', $options);}catch(paginationException $e){ echo $e; exit();}
if($paginate->success == true){$result = $paginate->resultset->fetchAll();?>
<table class="table">
<thead>
<tr>
<th>User</th>
<th>Amount</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
foreach($result as $row) {
echo '<tr><td><a data-toggle="tooltip" title="Click to view Steam Profile" href="http://steamcommunity.com/profiles/'.$row['community_id'].'">'.$row['steam_name'].'</a> (<span class="text-muted">'.$row['steam_id2'].'</span>)</td><td>'.$row['amount'].'</td><td>'.$row['date'].'</td></tr>'; }}?>
</center>
</tbody>
</table>
</p>
<?php echo $paginate->links_html; ?>
<?php echo '<p>Total Donations: <span class="text-muted">'.$paginate->total_results.'</span></p>'; ?>
</div>
</div>
它奇怪,因为在这个相同的脚本在我的其他Web服务器上正常工作..不知道为什么我在这里有这个问题...请帮助,任何帮助是apreciated。真的很困惑为什么会发生这种情况..如果你想要页面http://bluminati.tk/donate(点击查看该页面底部的所有捐款)