Пример #1
0
function read_whole_file_or_false($name)
{
    if (!file_exists($name)) {
        return false;
    }
    return read_whole_file($name);
}
Пример #2
0
function download_tar()
{
    $name = $GLOBALS['form_name'];
    $data = array(".htaccess" => make_htaccess(), "run.php ->" => 'code/wfpl/run.php', "style.css" => read_whole_file('code/wfpl/metaform/style.css'), "{$name}.html" => make_html(), "{$name}.php" => make_php());
    if ($GLOBALS['opt_db'] == 'Yes') {
        $data["{$name}.sql"] = make_sql();
    }
    if ($GLOBALS['opt_email'] == 'Yes') {
        $data["{$name}.email.txt"] = make_email();
    }
    make_tar($name, $data);
}