本文整理汇总了PHP中filesystem::file_put_contents方法的典型用法代码示例。如果您正苦于以下问题:PHP filesystem::file_put_contents方法的具体用法?PHP filesystem::file_put_contents怎么用?PHP filesystem::file_put_contents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类filesystem
的用法示例。
在下文中一共展示了filesystem::file_put_contents方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->savedata();
echo "- Configuration updated.<br />";
// Languages
$ini = array('settings' => array('language_de' => array('compatible_version' => VISCACHA_VERSION), 'language' => array('compatible_version' => VISCACHA_VERSION)), 'admin/frames' => array('language_de' => array('admin_scheduler_log' => 'Protokoll der geplanten Aufgaben')), 'classes' => array('language_de' => array('mailer_encoding' => 'Unbekanntes Encoding-Format: ', 'mailer_execute' => 'Konnte folgenden Befehl nicht ausführen: ', 'mailer_file_access' => 'Zugriff auf folgende Datei fehlgeschlagen: ', 'mailer_file_open' => 'Datei Fehler: Konnte folgende Datei nicht öffnen: ', 'mailer_from_failed' => 'Die folgende Absenderadresse ist nicht korrekt: ', 'mailer_recipients_failed' => 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ', 'mailer_signing' => 'Fehler beim Signieren: ', 'mailer_empty_message' => 'E-Mail Inhalt ist leer.', 'mailer_invalid_address' => 'E-Mail wird nicht gesendet, die Adresse ist ungültig.', 'mailer_smtp_connect_failed' => 'Verbindung zu SMTP Server fehlgeschlagen.', 'mailer_smtp_error' => 'Fehler vom SMTP Server: ', 'mailer_variable_set' => 'Kann Variable nicht setzen oder zurücksetzen: '), 'language' => array('mailer_authenticate' => 'SMTP Error: Could not authenticate.', 'mailer_connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'mailer_data_not_accepted' => 'SMTP Error: Data not accepted.', 'mailer_encoding' => 'Unknown encoding: ', 'mailer_execute' => 'Could not execute: ', 'mailer_file_access' => 'Could not access file: ', 'mailer_file_open' => 'File Error: Could not open file: ', 'mailer_from_failed' => 'The following From address failed: ', 'mailer_instantiate' => 'Could not instantiate mail function.', 'mailer_mailer_not_supported' => ' mailer is not supported.', 'mailer_provide_address' => 'You must provide at least one recipient email address.', 'mailer_recipients_failed' => 'SMTP Error: The following recipients failed: ', 'mailer_empty_message' => 'Message body empty', 'mailer_invalid_address' => 'Invalid address', 'mailer_smtp_connect_failed' => 'SMTP Connect() failed.', 'mailer_smtp_error' => 'SMTP server error: ', 'mailer_variable_set' => 'Cannot set or reset variable: ')), 'global' => array('language_de' => array('digest_d' => 'Tägliche E-Mail-Benachrichtigung', 'digest_none' => 'Keine Benachrichtigung', 'img_captcha_session_expired_error' => 'Seite aktualisieren', 'digest_f' => 'Nur Favorit'), 'language' => array('digest_none' => 'No notification', 'img_captcha_session_expired_error' => 'Refresh page', 'digest_f' => 'Favorite only')));
updateLanguageFiles($ini);
echo "- Language files updated.<br />";
$newCss = file_get_contents('temp/standard.css');
$dir = dir('designs');
while (false !== ($entry = $dir->read())) {
if (is_id($entry)) {
$path = "{$dir->path}/{$entry}/standard.css";
$css = file_get_contents($path);
if (!empty($css)) {
$css .= $newCss;
if (!$filesystem->file_put_contents($path, $css)) {
$css = null;
}
}
if (empty($css)) {
echo "<br />!!! <strong>Warning:</strong> Updating {$path} failed. Plase add the following CSS code to your main css file in designs/{$entry}:<br /><code>";
echo htmlentities($newCss);
echo "</code><br /><br />";
}
}
}
echo "- Stylesheets updated.<br />";
// Set incompatible packages inactive
setPackagesInactive();
echo "- Incompatible Packages set as 'inactive'.<br />";
// Refresh Cache
示例2: manageconfig
echo "- FTP class loaded, Database connection started.<br />";
// Config/Hooks
$c = new manageconfig();
$c->getdata('../data/config.inc.php');
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->delete('asia');
$c->savedata();
$c = new manageconfig();
$c->getdata('../admin/data/config.inc.php', 'admconfig');
$c->updateconfig('default_language', int, 0);
$c->updateconfig('checked_package_updates', int, 0);
$c->savedata();
$hooks = file_get_contents('../admin/data/hooks.txt');
if (strpos($hooks, "-update") === false) {
$hooks = str_replace("-uninstall", "-uninstall\r\n-update_init\r\n-update_finish", $hooks);
$filesystem->file_put_contents('../admin/data/hooks.txt', $hooks);
}
echo "- Configuration and Hooks updated.<br />";
// Old files
$filesystem->unlink('../classes/class.imageconverter.php');
echo "- Old files deleted.<br />";
// Stylesheets
$dir = dir('../designs/');
while (false !== ($entry = $dir->read())) {
$path = $dir->path . DIRECTORY_SEPARATOR . $entry . DIRECTORY_SEPARATOR;
if (is_dir($path) && is_numeric($entry) && $entry > 0) {
if (file_exists($path . 'standard.css')) {
$file = file_get_contents($path . 'standard.css');
$file .= "\r\n.tooltip {\r\n\tleft: -1000px;\r\n\ttop: -1000px;\r\n\tvisibility: hidden;\r\n\tposition: absolute;\r\n\tmax-width: 300px;\r\n\tmax-height: 300px;\r\n\toverflow: auto;\r\n\tborder: 1px solid #336699;\r\n\tbackground-color: #ffffff;\r\n\tfont-size: 8pt;\r\n}\r\n";
$file .= "\r\n.tooltip_header {\r\n\tdisplay: block;\r\n\tbackground-color: #E1E8EF;\r\n\tcolor: #24486C;\r\n\tpadding: 3px;\r\n\tborder-bottom: 1px solid #839FBC;\r\n}\r\n";
$file .= "\r\n.tooltip_body {\r\n\tpadding: 3px;\r\n}\r\n";
示例3: count
while (false !== ($entry = $dir->read())) {
if (is_id($entry) && is_dir($rep[1] . '/' . $entry)) {
$dirs[$rep[1]][$entry] = $rep[1] . '/' . $entry . '/';
}
}
$dir->close();
}
$content = file_get_contents($rep[0]);
foreach ($dirs[$rep[1]] as $path) {
$target = $path . $rep[3];
if (file_exists($target)) {
$filesystem->chmod($target, 0666);
} elseif (!@is_dir(dirname($target))) {
$filesystem->mkdir(dirname($target), 0777);
}
$filesystem->file_put_contents($target, $content);
}
}
?>
<div class="bfoot">Source file updater - Step <?php
echo $sub;
?>
of <?php
echo count($tar_packs);
?>
- Currently extracting: <?php
echo $tar_packs[$sub];
?>
</div>
<?php
if ($error === false) {
示例4: breadcrumb
include_once "classes/class.breadcrumb.php";
// Global functions
require_once "classes/function.global.php";
// Load Flood-Check
include_once "classes/function.flood.php";
if (!file_exists('.htaccess')) {
$htaccess = '';
if ($config['hterrordocs'] == 1) {
$htaccess = "\n\t ErrorDocument 400\t{$config['furl']}/misc.php?action=error&id=400\n\t ErrorDocument 401\t{$config['furl']}/misc.php?action=error&id=401\n\t ErrorDocument 403\t{$config['furl']}/misc.php?action=error&id=403\n\t ErrorDocument 404\t{$config['furl']}/misc.php?action=error&id=404\n\t ErrorDocument 500\t{$config['furl']}/misc.php?action=error&id=500\n\t ";
}
if ($config['correctsubdomains'] == 1) {
$url = parse_url($config['furl']);
$host = str_ireplace('www.', '', $url['host']);
$htaccess .= "\n\t RewriteEngine On\n\t RewriteCond %{HTTP_HOST} ^www\\." . preg_quote($host) . "\$ [NC]\n\t RewriteRule ^(.*)\$ http://" . $host . "/\$1 [R=301,L]\n\t ";
}
$filesystem->file_put_contents('.htaccess', $htaccess);
}
$breadcrumb = new breadcrumb();
$breadcrumb->Add($config['fname'], 'index.php');
$phpdoc = new OutputDoc($config['gzip']);
$phpdoc->Start($config['gzcompression']);
if ($config['gzip'] == 1 && $phpdoc->Encoding()) {
$gzbenchval = 'On - Compression Rate: ' . $config['gzcompression'];
} else {
$gzbenchval = 'Off';
}
($code = $plugins->load('frontend_init')) ? eval($code) : null;
if ($config['foffline'] && defined('TEMPSHOWLOG') == false && SCRIPTNAME != 'external') {
$slog = new slog();
$my = $slog->logged();
$my->p = $slog->Permissions();
示例5: filesystem
$filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
$filesystem->set_wd($config['ftp_path'], $config['fpath']);
}
if (!class_exists('DB')) {
require_once 'install/classes/database/' . $config['dbsystem'] . '.inc.php';
$db = new DB($config['host'], $config['dbuser'], $config['dbpw'], $config['database'], $config['dbprefix']);
$db->setPersistence($config['pconnect']);
}
echo "- FTP class loaded, Database connection started.<br />";
// Hooks
$hooks = array_map('trim', file('admin/data/hooks.txt'));
removeHook($hooks, 'editprofile_copy_');
removeHook($hooks, 'popup_hlcode_');
removeHook($hooks, 'popup_code_');
insertHookAfter($hooks, 'showtopic_entry_added', 'showtopic_attachments_prepared');
$filesystem->file_put_contents('admin/data/hooks.txt', implode("\r\n", $hooks));
echo "- Hooks updated.<br />";
// Config
$c = new manageconfig();
$c->getdata('data/config.inc.php');
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->updateconfig('doclang', int, $config['langdir']);
$c->updateconfig('error_reporting', str, 'E_ALL');
$c->updateconfig('login_attempts_blocktime', int, 60);
$c->updateconfig('login_attempts_max', int, 5);
$c->updateconfig('login_attempts_time', int, 60);
$c->delete('check_filesystem');
$c->delete('enable_jabber');
$c->delete('jabber_server');
$c->delete('jabber_user');
$c->delete('jabber_pass');
示例6: array
// templates
$dir = "../templates/";
$tplids = array();
$d = dir($dir);
while (false !== ($entry = $d->read())) {
if (is_dir($dir . $entry) && preg_match('/^\\d{1,}$/', $entry) && $entry != '.' && $entry != '..') {
$tplids[] = $entry;
}
}
$d->close();
foreach ($tplids as $id) {
$tpldir = $dir . $id;
$filesystem->chmod($tpldir . '/header.html', 0666);
$header = file_get_contents($tpldir . '/header.html');
$header = str_ireplace("<!--[if lt IE 7]>", "<!--[if IE]>", $header);
$filesystem->file_put_contents($tpldir . '/header.html', $header);
}
echo "- Templates updated.<br />";
$ini = array('global' => array('language' => array('post_settings' => 'Options:', 'pm_not_found' => 'Private Message not found.'), 'language_de' => array('register_resend_desc' => 'Sollten Sie sich bereits registriert - aber den Bestätigungslink der Registrierungs-E-Mail noch nicht angeklickt haben, konnte Ihre Registrierung nicht vollständig abgeschlossen werden. Sie haben hier die Möglichkeit, Ihnen diese E-Mail erneut zuschicken zu lassen, ohne den Registrierungsvorgang wiederholen zu müssen. Dazu tragen Sie lediglich den bereits von Ihnen beantragten Benutzernamen ein - und die E-Mail wird Ihnen erneut an Ihre bereits bei der Registrierung angegebene E-Mail-Adresse übersandt.', 'pm_not_found' => 'Die PN wurde nicht gefunden.')));
$c = new manageconfig();
$codes = array();
$keys = array('language', 'language_de');
foreach ($keys as $entry) {
if (preg_match('~language_(\\w{2})_?(\\w{0,2})~i', $entry, $code)) {
if (!isset($codes[$code[1]])) {
$codes[$code[1]] = array();
}
if (isset($code[2])) {
$codes[$code[1]][] = $code[2];
} else {
if (!in_array('', $codes[$code[1]])) {
示例7: manageconfig
$c = new manageconfig();
$c->getdata('../data/config.inc.php');
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->updateconfig('disableregistration', int, 0);
$c->updateconfig('hidedesign', int, 0);
$c->updateconfig('hidelanguage', int, 0);
$c->updateconfig('mlist_fields', str, 'fullname,pm,regdate,hp,icq,yahoo,aol,msn,jabber,skype');
$c->updateconfig('mlist_filtergroups', int, 0);
$c->updateconfig('mlist_showinactive', int, 0);
$c->updateconfig('register_notification', str, '');
$c->updateconfig('updatepostcounter', int, 1);
$c->savedata();
$d = file('../data/cron/crontab.inc.php');
$d = array_map('trim', $d);
$d[] = '0 */6 * * * recountpostcounts.php #Recount User Post Counter';
$filesystem->file_put_contents('../data/cron/crontab.inc.php', implode("\n", $d));
$filesystem->unlink('../images/1/bbcodes/wiki.gif');
$db->query("ALTER TABLE `{$db->pre}forums` ADD `count_posts` enum('0','1') NOT NULL default '1' AFTER `last_topic`", __LINE__, __FILE__);
$db->query("ALTER TABLE `{$db->pre}user` ADD `posts` mediumint(7) unsigned NOT NULL default '0' AFTER `regdate`", __LINE__, __FILE__);
// Update Postcounts
$result = $db->query("SELECT COUNT(*) AS new, u.posts, u.id FROM {$db->pre}replies AS r LEFT JOIN {$db->pre}user AS u ON u.id = r.name WHERE r.guest = '0' GROUP BY u.id", __LINE__, __FILE__);
$i = 0;
while ($row = $db->fetch_assoc($result)) {
if ($row['new'] != $row['posts']) {
$i++;
$db->query("UPDATE {$db->pre}user SET posts = '{$row['new']}' WHERE id = '{$row['id']}'", __LINE__, __FILE__);
}
}
// Refresh Cache
$dirs = array('../cache/', '../cache/modules/');
foreach ($dirs as $dir) {
示例8: while
}
}
// Cache löschen
$cachedir = 'cache/';
if ($dh = @opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (strpos($file, '.inc.php') !== false) {
$fileTrim = str_replace('.inc.php', '', $file);
$filesystem->unlink($cachedir . $file);
}
}
closedir($dh);
}
if (count($error) == 0) {
$lf = './locked.txt';
$filesystem->file_put_contents($lf, '');
?>
<div class="bbody">
<p>The installation is completed. You can access the Admin Control Panel with your username and password.
Please go through the settings and change everything to fit your needs.
After doing this, you can switch your board "online". By default it is switched "offline".
If you have problems, visit <a href="http://docs.viscacha.org" target="_blank">Viscacha.org</a>.</p>
<p class="hl_false">
For your server security please completely remove the installation directory (<code><?php
echo realpath('./');
?>
</code>) including all files and sub-folders!
<?php
if (file_exists($lf)) {
?>
It is locked at the moment, but we highly recommend to remove the directory.
示例9: filesystem
$filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
$filesystem->set_wd($config['ftp_path'], $config['fpath']);
}
if (!class_exists('DB')) {
require_once 'install/classes/database/' . $config['dbsystem'] . '.inc.php';
$db = new DB($config['host'], $config['dbuser'], $config['dbpw'], $config['database'], $config['dbprefix']);
$db->setPersistence($config['pconnect']);
}
echo "- FTP class loaded, Database connection started.<br />";
// Hooks (ToDo: this sould be done in one step!)
$hooks = array_map('trim', file('admin/data/hooks.txt'));
removeHook($hooks, 'pdf');
removeHook($hooks, 'components_');
$hooks[] = '';
$hooks[] = 'admin/packages_admin.php';
$filesystem->file_put_contents('admin/data/hooks.txt', implode("\r\n", $hooks));
$hooks = file_get_contents('admin/data/hooks.txt');
$add_com = array('components.php');
$add_acom = array('admin/packages_admin.php');
$result = $db->query("SELECT internal FROM {$db->pre}packages");
while ($row = $db->fetch_assoc($result)) {
$internal = preg_quote($row['internal'], "~");
if (!preg_match("~^-component_{$internal}\$~im", $hooks)) {
$add_com[] = "-component_{$row['internal']}";
}
if (!preg_match("~^-admin_component_{$internal}\$~im", $hooks)) {
$add_acom[] = "-admin_component_{$row['internal']}";
}
}
if (count($add_com) > 1) {
$hooks = preg_replace("~^components.php\$~im", implode("\r\n", $add_com), $hooks);
示例10: ENUM
$c->updateconfig('spider_pendinglist', int, 0);
$c->updateconfig(array('module_1', 'relatednum'), int, 5);
$c->updateconfig(array('module_3', 'items'), int, 5);
$c->updateconfig(array('module_3', 'teaserlength'), int, 300);
$c->updateconfig(array('module_4', 'title'), str, 'Ticker');
$c->updateconfig(array('module_4', 'feed'), int, 1);
$c->updateconfig(array('module_7', 'text'), str, 'Willkommen in Ihrer <a href="http://www.viscacha.org" target="_blank">Viscacha</a>-Installation!');
$c->updateconfig(array('module_7', 'title'), str, 'Wichtige Nachricht!');
$c->updateconfig(array('module_9', 'topicnum'), int, 10);
$c->updateconfig(array('module_10', 'repliesnum'), int, 5);
$c->savedata();
$filesystem->unlink('../admin/form.php');
$filesystem->unlink('../templates/newsfeed.js');
rmdirr('../classes/magpie_rss/extlib/');
$filesystem->mkdir('../cache/modules/', 0777);
$filesystem->file_put_contents('../data/errlog_php.inc.php', '');
$db->query("ALTER TABLE `{$db->pre}abos` CHANGE `type` `type` ENUM( '', 'd', 'w', 'f' ) NOT NULL", __LINE__, __FILE__, false);
$result = $db->query("SELECT mid, tid FROM {$db->pre}fav", __LINE__, __FILE__, false);
while ($row = $db->fetch_assoc($result)) {
$db->query("INSERT INTO `{$db->pre}abos` (`mid`, `tid`, `type`) VALUES ('{$row['mid']}', '{$row['tid']}', 'f')", __LINE__, __FILE__, false);
}
$db->query("DROP TABLE `{$db->pre}fav`", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}bbcode` CHANGE `type` `type` ENUM('censor','word','replace') NOT NULL DEFAULT 'word'", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}bbcode` RENAME `{$db->pre}textparser`", __LINE__, __FILE__, false);
$db->query("DROP TABLE `{$db->pre}bbcode`", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}cat` ADD `forumzahl` tinyint(3) unsigned NOT NULL default '0' AFTER `optvalue`", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}cat` ADD `topiczahl` tinyint(3) unsigned NOT NULL default '0' AFTER `forumzahl`", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}cat` ADD `invisible` enum('0','1') NOT NULL default '0' AFTER `prefix`", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}cat` ADD INDEX ( `last_topic` )", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}designs` DROP COLUMN `smileyfolder`", __LINE__, __FILE__, false);
$db->query("ALTER TABLE `{$db->pre}designs` DROP COLUMN `smileypath`", __LINE__, __FILE__, false);
示例11: filesystem
echo "- Source files loaded<br />";
if (!class_exists('filesystem')) {
require_once 'install/classes/class.filesystem.php';
$filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
$filesystem->set_wd($config['ftp_path'], $config['fpath']);
}
if (!class_exists('DB')) {
require_once 'install/classes/database/' . $config['dbsystem'] . '.inc.php';
$db = new DB($config['host'], $config['dbuser'], $config['dbpw'], $config['database'], $config['dbprefix']);
$db->setPersistence($config['pconnect']);
}
echo "- FTP class loaded, Database connection started.<br />";
// Hooks
$hooks = array_map('trim', file('admin/data/hooks.txt'));
removeHook($hooks, 'pdf');
$filesystem->file_put_contents('admin/data/hooks.txt', implode("\r\n", $hooks));
echo "- Hooks updated.<br />";
// Config
$c = new manageconfig();
$c->getdata('data/config.inc.php');
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->updateconfig('fname', str, htmlentities($config['fname'], ENT_QUOTES));
$c->updateconfig('fdesc', str, htmlentities($config['fdesc'], ENT_QUOTES));
$c->updateconfig('always_send_js', int, 1);
$c->updateconfig('vote_change', int, 0);
$c->updateconfig('botgfxtest_width', int, 150);
$c->updateconfig('botgfxtest_height', int, 40);
$c->updateconfig('botgfxtest_recaptcha_private', str, '');
$c->updateconfig('botgfxtest_recaptcha_public', str, '');
$c->delete('pdfcompress');
$c->delete('pdfdownload');
示例12: filesystem
require_once 'install/classes/class.filesystem.php';
$filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
$filesystem->set_wd($config['ftp_path'], $config['fpath']);
}
if (!class_exists('DB')) {
require_once 'install/classes/database/' . $config['dbsystem'] . '.inc.php';
$db = new DB($config['host'], $config['dbuser'], $config['dbpw'], $config['database'], $config['dbprefix']);
$db->setPersistence($config['pconnect']);
}
echo "- FTP class loaded, Database connection started.<br />";
// Hooks
$hooks = array_map('trim', file('admin/data/hooks.txt'));
removeHook($hooks, 'components_');
$hooks[] = '';
$hooks[] = 'admin/packages_admin.php';
$filesystem->file_put_contents('admin/data/hooks.txt', implode("\r\n", $hooks));
echo "- Hooks updated.<br />";
// Config
$c = new manageconfig();
$c->getdata('data/config.inc.php');
$c->updateconfig('version', str, VISCACHA_VERSION);
$c->updateconfig('spider_logvisits', int, 2);
$c->delete('always_send_js');
$c->savedata();
$c = new manageconfig();
$c->getdata('admin/data/config.inc.php', 'admconfig');
$c->updateconfig('checked_package_updates', int, 0);
$c->savedata();
echo "- Configuration updated.<br />";
// Old files
$filesystem->unlink('templates/lang2js.php');
示例13: dir
'compatible_version' => VISCACHA_VERSION,
),
)
);
updateLanguageFiles($ini);
$dir = dir('language');
while (false !== ($entry = $dir->read())) {
$path = "{$dir->path}/{$entry}";
if (is_dir($path) && is_id($entry)) {
$lng_settings = loadSettingArray($path);
if ($lng_settings['lang_code'] != 'de') {
$lng_settings['lang_code'] = 'en';
}
$filesystem->file_put_contents(
"{$path}/mails/digest_d.php",
file_get_contents('install/package/update_08/language/'.$lng_settings['lang_code'].'/digest_d.php')
);
$filesystem->file_put_contents(
"{$path}/mails/digest_w.php",
file_get_contents('install/package/update_08/language/'.$lng_settings['lang_code'].'/digest_w.php')
);
$filesystem->file_put_contents(
"{$path}/mails/digest_s.php",
file_get_contents('install/package/update_08/language/'.$lng_settings['lang_code'].'/digest_s.php')
);
$filesystem->file_put_contents(
"{$path}/mails/report_post.php",
file_get_contents('install/package/update_08/language/'.$lng_settings['lang_code'].'/report_post.php')
);
}
}
示例14: manageconfig
} else {
$config['dbsystem'] = 'mysql';
}
$c = new manageconfig();
$c->getdata('../data/config.inc.php');
$c->updateconfig('host', str);
$c->updateconfig('dbuser', str);
$c->updateconfig('dbpw', str);
$c->updateconfig('database', str);
$c->updateconfig('pconnect', int);
$c->updateconfig('dbprefix', str);
$c->updateconfig('dbsystem', str);
$c->savedata();
$errlog = '../data/errlog_' . $config['dbsystem'] . '.inc.php';
if (!file_exists($errlog)) {
$filesystem->file_put_contents($errlog, '');
$filesystem->chmod($errlog, 0666);
}
?>
<div class="bfoot center">Database Settings saved!</div>
<?php
}
require '../data/config.inc.php';
$prefix = preg_replace("/\\W+/i", '', $config['dbprefix']);
if ($prefix != $config['dbprefix']) {
?>
<div class="bbody">The prefix is not valid!</div>
<div class="bfoot center"><a class="submit" href="index.php?package=install&step=<?php
echo $step - 1;
?>
">Go back</a> <a class="submit" href="index.php?package=install&step=<?php
示例15: while
}
}
// Cache löschen
$cachedir = 'cache/';
if ($dh = @opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (strpos($file, '.inc.php') !== false) {
$fileTrim = str_replace('.inc.php', '', $file);
$filesystem->unlink($cachedir . $file);
}
}
closedir($dh);
}
if (count($error) == 0) {
$lf = './locked.txt';
$filesystem->file_put_contents($lf, '', true);
?>
<div class="bbody">
<p>The installation is completed. You can access the Admin Control Panel with your username and password.
Please go through the settings and change everything to fit your needs.
After doing this, you can switch your board "online". By default it is switched "offline".
If you have problems, visit <a href="http://docs.viscacha.org" target="_blank">Viscacha.org</a>.</p>
<p class="hl_false">
For your server security please completely remove the installation directory (<addr><?php
echo realpath('./install/');
?>
</addr>) including all files and sub-folders!
<?php
if (file_exists($lf)) {
?>
It is locked at the moment, but we highly recommend to remove the directory.