Fixing #9
This commit is contained in:
parent
5acb10101f
commit
f907af85c7
|
@ -450,6 +450,7 @@ if (!class_exists("Owark")) {
|
|||
if (!file_exists($file_location)) {
|
||||
// If index.html doesn't exist, find another html file!
|
||||
$dir = opendir('.'.$loc);
|
||||
if ($dir) {
|
||||
while (false !== ($file = readdir($dir))) {
|
||||
if ('.html' === substr($file, strlen($file) - 5)) {
|
||||
$file_location = '.'.$loc.'/' . $file;
|
||||
|
@ -458,12 +459,17 @@ if (!class_exists("Owark")) {
|
|||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
// Read the file
|
||||
|
||||
if (file_exists($file_location)) {
|
||||
$f = fopen($file_location, "r");
|
||||
$content = fread($f, filesize($file_location));
|
||||
fclose($f);
|
||||
} else {
|
||||
$content = 'Archive not found';
|
||||
}
|
||||
|
||||
// Which encoding?
|
||||
$encoding = $link->encoding;
|
||||
|
|
Loading…
Reference in New Issue