topical media & game development
professional-sql-07-public-files-view.php / php
<?php
// include shared code
include '../lib/config.php';
// make sure users only access files in the albums
_GET['file'])) ? (BASEDIR . '/' . file && strpos(realpath(file))
{
// dump file content to browser
switch(substr(file, '.') + 1))
{
// file is jpeg image
case 'jpg':
case 'jpeg':
header('Content-Type: image/jpeg');
readfile(file);
}
}
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.