私は、ユーザーがオンラインpdfをアップロード/ダウンロード/閲覧できるWebアプリケーションを作成しています。 pdfファイルの名前を新しいタブのリンクで表示するように変更したいのです(すべてのウェブサイトに表示されているように)。PDFビューリンク:PHP
誰でも、データベース内のどのフィールドを作成して、ユーザーがクリックすると新しいタブでpdfを開くリンクを提供するのか知っていますか?
if($result) {
if($result->num_rows == 0) {
echo '<p>There are no files in the database</p>';
}
else {
// Print the top of a table
echo '<table width="100%">
<tr>
<td><b>Name</b></td>
<td><b>type</b></td>
<td><b>Size (bytes)</b></td>
<td><b>Created</b></td>
<td><b> </b></td>
<td><b>view><b/></td>
</tr>';
// Print each file
while($row = $result->fetch_assoc()) {
echo "
<tr>
<td>{$row['name']}</td>
<td>{$row['type']}</td>
<td>{$row['size']}</td>
<td>{$row['created']}</td>
</tr>";
}
// Close table
echo '</table>';
}
// Free the result
$result->free();
}
else
{
echo 'Error! SQL query failed:';
echo "<pre>{$dbLink->error}</pre>";
}
// Close the mysql connection
$dbLink->close();
私たちに '$ row'のサンプルデータを見せてください – webbiedave