diff --git a/changelog.php b/changelog.php index 2b0dc3ae0..1b4807aa4 100644 --- a/changelog.php +++ b/changelog.php @@ -6,7 +6,15 @@ * @version $Id$ */ -$changelog = htmlspecialchars(file_get_contents('ChangeLog')); +$filename = 'ChangeLog'; + +// Check if the file is available, some distributions remove these. +if (is_readable($filename)) { + $changelog = htmlspecialchars(file_get_contents($filename)); +} else { + echo "The $filename file is not available on this system, please visit www.phpmyadmin.net for more information."; + exit; +} $replaces = array( '@(http://[./a-zA-Z0-9.-]*[/a-zA-Z0-9])@' diff --git a/license.php b/license.php index 91927f41a..c8c295799 100644 --- a/license.php +++ b/license.php @@ -13,5 +13,14 @@ * */ header('Content-type: text/plain; charset=iso-8859-1'); -readfile('LICENSE'); + +$filename = 'LICENSE'; + +// Check if the file is available, some distributions remove these. +if (is_readable($filename)) { + readfile($filename); +} else { + echo "The $filename file is not available on this system, please visit www.phpmyadmin.net for more information."; +} + ?> diff --git a/readme.php b/readme.php index 34fecce0e..7f59a4e2f 100644 --- a/readme.php +++ b/readme.php @@ -13,5 +13,13 @@ * */ header('Content-type: text/plain; charset=utf-8'); -readfile('README'); + +$filename = 'README'; + +// Check if the file is available, some distributions remove these. +if (is_readable($filename)) { + readfile($filename); +} else { + echo "The $filename file is not available on this system, please visit www.phpmyadmin.net for more information."; +} ?>