PHP Classes

File: setup.php

Recommend this page to a friend!
  Classes of Karl Holz   eKatab PHP ePub Reader   setup.php   Download  
File: setup.php
Role: Example script
Content type: text/plain
Description: Example script
Class: eKatab PHP ePub Reader
Display ebooks in the epub format on Web pages
Author: By
Last change: Update of setup.php
Date: 1 year ago
Size: 876 bytes
 

Contents

Class file image Download
<?php

include_once('eKatab/eKatab_setup.class.php');

function
setup($glob=array()) {
    echo
count($glob) . " Books found \n\n";
    if (
count($glob) == 0) {
        return
FALSE;
    }
    foreach (
$glob as $e) {
        echo
'----------------------------------------------'. "\n";
       
$n=str_replace(array("'", "?"), array("", ""), $e);
        if (
$e != $n) {
           
// rename files
           
rename($e, $n);
            new
eKatab_setup($n);
        } else {
            new
eKatab_setup($e);
        }

    }
}


//new eKatab_setup('Books/An-Nawawis Forty Hadith.epub'); exit();


setup(glob('Books/*.epub'));

echo
"\n\n##############################################\n";
echo
" iBooks will not display the media proerly,\n but you can still read the text \n";
echo
'----------------------------------------------'. "\n";
setup(glob('Books/*.ibooks'));