本文整理汇总了PHP中write_ini_file函数的典型用法代码示例。如果您正苦于以下问题:PHP write_ini_file函数的具体用法?PHP write_ini_file怎么用?PHP write_ini_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了write_ini_file函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: set
/**
* Write or update a configuration string
*
* @param string $prefix
* @param string $key
* @param string $value
*/
public function set($prefix, $key, $value)
{
$prefix = strtolower($prefix);
$key = strtolower($key);
$this->settings[$prefix][$key] = $value;
write_ini_file($this->settings, $this->path, true);
}
开发者ID:youmy001,项目名称:apine-framework,代码行数:14,代码来源:Config.php
示例2: SetPage
function SetPage($PageName, $Data)
{
if (file_exists("page/{$PageName}/config.ini")) {
$Config["general"]["filename"] = $Data["filename"];
$Config["general"]["title"] = $Data["title"];
$Config["general"]["type"] = $Data["type"];
$Config["general"]["author"] = $Data["author"];
$Config["general"]["date"] = $Data["date"];
$Config["general"]["time"] = $Data["time"];
$Config["general"]["tag"] = $Data["tag"];
$Config["general"]["priority"] = $Data["priority"];
write_ini_file($Config, "page/{$PageName}/config.ini");
return 1;
} else {
return 0;
}
}
开发者ID:atnanasi,项目名称:staylog,代码行数:17,代码来源:stayfunc.php
示例3: InputForm
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Update comments configuration //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['config']) && is_array($_POST['config'])) {
if (write_ini_file($_POST['config'], CONFIG_PATH . 'comments.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
} else {
rcms_showAdminMessage(__('Error occurred'));
}
}
////////////////////////////////////////////////////////////////////////////////
// Interface generation //
////////////////////////////////////////////////////////////////////////////////
$config = parse_ini_file(CONFIG_PATH . 'comments.ini');
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Comments configuration'));
$frm->addrow(__('Maximum message length'), $frm->text_box('config[max_message_len]', $config['max_message_len'], 5));
$frm->addrow(__('Maximum word length'), $frm->text_box('config[max_word_len]', $config['max_word_len'], 4));
$frm->addrow(__('Maximum size of database (in messages)'), $frm->text_box('config[max_db_size]', $config['max_db_size'], 5));
$frm->addbreak(__('Configuration') . ' bbcodes');
$frm->addrow(__('Enable nl2br and bbCodes') . __(' (except images)'), $frm->checkbox('config[bbcodes]', '1', '', @$config['bbcodes'], 4));
$frm->addrow(__('Enable all') . ' bbcodes', $frm->checkbox('config[links]', '1', '', @$config['links'], 4));
$frm->show();
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:30,代码来源:comments.php
示例4: foreach
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['save'])) {
foreach ($system->disable_feeds as $dkey => $dvalue) {
if (!empty($_POST['rss_disable'][$dkey])) {
$system->disable_feeds[$dkey] = 1;
} else {
$system->disable_feeds[$dkey] = 0;
}
}
write_ini_file($system->disable_feeds, CONFIG_PATH . 'rss_disable.ini');
rcms_showAdminMessage(__('Configuration updated'));
}
// Interface generation
$frm = new InputForm('', 'post', __('Save'));
//RSS configuration
$frm->addbreak(__('RSS Feeds list'));
foreach ($system->disable_feeds as $key => $value) {
$frm->addrow(__('Disable') . ' ' . __('RSS feed'), $frm->checkbox('rss_disable[' . $key . ']', '1', $key, $system->disable_feeds[$key]));
}
$frm->hidden('save', '1');
$frm->show();
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:27,代码来源:rss.php
示例5: deleteComment
function deleteComment($cat_id, $art_id, $comment)
{
$cat_id = (int) $cat_id;
$art_id = (int) $art_id;
if (empty($this->container)) {
$this->last_error = __('No section selected!');
return false;
}
if ($this->container !== '#root' && $this->container !== '#hidden') {
if (!($category = $this->getCategory($cat_id))) {
return false;
}
$art_prefix = ARTICLES_PATH . $this->container . '/' . $cat_id . '/' . $art_id . '/';
} else {
$art_prefix = ARTICLES_PATH . $this->container . '/' . $art_id . '/';
}
if ($data = @unserialize(@file_get_contents($art_prefix . 'comments'))) {
if (isset($data[$comment])) {
rcms_remove_index($comment, $data, true);
@file_write_contents($art_prefix . 'comments', serialize($data));
$article_data = rcms_parse_ini_file($art_prefix . 'define');
$article_data['comcount']--;
@write_ini_file($article_data, $art_prefix . 'define');
}
if ($this->container !== '#root' && $this->container !== '#hidden') {
$this->index[$cat_id][$art_id]['ccnt']--;
} else {
$this->index[$art_id]['ccnt']--;
}
$res = $this->saveIndex();
return $res;
} else {
return false;
}
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:35,代码来源:api.articles.php
示例6: rcms_showAdminMessage
// but WITHOUT ANY WARRANTY, without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. //
// //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['urls']) && !empty($_POST['names']) && is_array($_POST['urls']) && is_array($_POST['names'])) {
if (count($_POST['urls']) !== count($_POST['names'])) {
rcms_showAdminMessage($lang['general']['navigation_error']);
} else {
$result = array();
$cnt = count($_POST['urls']);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($_POST['urls'][$i])) {
$result[$i]['url'] = @$_POST['urls'][$i];
$result[$i]['name'] = $_POST['names'][$i];
}
}
write_ini_file($result, CONFIG_PATH . 'navigation.ini', true) or rcms_showAdminMessage($lang['general']['navigation_error']);
}
}
$links = parse_ini_file(CONFIG_PATH . 'navigation.ini', true);
// Interface generation
$frm = new InputForm("", "post", $lang['general']['submit']);
$frm->addbreak($lang['admincp']['general']['navigation']['title']);
$frm->addrow($lang['general']['url'], $lang['general']['title']);
foreach ($links as $link) {
$frm->addrow($frm->text_box('urls[]', $link['url']), $frm->text_box('names[]', $link['name']));
}
$frm->addrow($frm->text_box('urls[]', ''), $frm->text_box('names[]', ''));
$frm->addmessage($lang['general']['navigation_desc']);
$frm->show();
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:31,代码来源:general.nav.php
示例7: rcms_showAdminMessage
// but WITHOUT ANY WARRANTY, without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. //
// //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['field_id']) && !empty($_POST['field_name'])) {
if (sizeof($_POST['field_id']) != sizeof($_POST['field_id'])) {
rcms_showAdminMessage(__('Cannot save configuration'));
} else {
$cnt = sizeof($_POST['field_id']);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($_POST['field_id'][$i])) {
$result[$_POST['field_id'][$i]] = $_POST['field_name'][$i];
}
}
if (write_ini_file($result, CONFIG_PATH . 'users.fields.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
$system->data['apf'] = $result;
} else {
rcms_showAdminMessage(__('Cannot save configuration'));
}
}
}
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Manage additional fields'));
$frm->addrow(__('ID'), __('Title'));
foreach ($system->data['apf'] as $field_id => $field_name) {
$frm->addrow($frm->text_box('field_id[]', $field_id), $frm->text_box('field_name[]', $field_name));
}
$frm->addrow($frm->text_box('field_id[]', ''), $frm->text_box('field_name[]', ''));
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:fields.php
示例8: save_config
function save_config($type = 'ini')
{
global $INI;
$q = ZSystem::GetSaveINI($INI);
if (strtoupper($type) == 'INI') {
if (!is_writeable(SYS_INIFILE)) {
return false;
}
return write_ini_file($q, SYS_INIFILE);
}
if (strtoupper($type) == 'PHP') {
if (!is_writeable(SYS_PHPFILE)) {
return false;
}
return write_php_file($q, SYS_PHPFILE);
}
return false;
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:18,代码来源:common.php
示例9: array
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (isset($_POST['disable'])) {
if (!is_array($_POST['disable'])) {
$_POST['disable'] = array();
}
if (write_ini_file($_POST['disable'], CONFIG_PATH . 'disable.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
} else {
rcms_showAdminMessage(__('Error occurred'));
}
}
$system->initialiseModules(true);
if (!($disabled = @parse_ini_file(CONFIG_PATH . 'disable.ini'))) {
$disabled = array();
}
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Modules management'));
$frm->hidden('disable', '');
foreach ($system->modules as $type => $modules) {
foreach ($modules as $module => $moduledata) {
$frm->addrow(__('Module') . ': ' . $moduledata['title'] . '<br/><b>' . $moduledata['copyright'] . '</b>', $frm->checkbox('disable[' . $module . ']', '1', __('Disable'), !empty($disabled[$module])));
}
}
$frm->show();
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:31,代码来源:module_dis.php
示例10: PDO
if (!empty($clientkey) && !empty($masterkey) && !empty($mysql_hostname) && !empty($mysql_username) && !empty($mysql_password) && !empty($mysql_database)) {
try {
$testDb = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database . ';charset=utf8', $mysql_username, $mysql_password);
} catch (PDOException $e) {
die('{"error":"Wrong MySQL Information!"}');
}
$config = parse_ini_file('../config.ini.php', false);
$config["mysql_hostname"] = $mysql_hostname;
$config["mysql_username"] = $mysql_username;
$config["mysql_password"] = $mysql_password;
$config["mysql_database"] = $mysql_database;
$config["mysql_charset"] = "utf8";
$config["database_fields"] = "configity_fields";
$config["configity_clientkey"] = $clientkey;
$config["configity_masterkey"] = $masterkey;
$result = write_ini_file($config, '../config.ini.php', false);
if ($result) {
//Config updated successfully
require '../configity-manager.php';
$configity_fields_table = file_get_contents("configity_fields.sql");
$callbackResult = $database->ExecuteSQL($configity_fields_table);
if ($callbackResult) {
//Fields database successfully added
echo '{"success":"Install successful"}';
} else {
echo '{"error":"Error, server couldnt add the fields table!"}';
}
} else {
//Server error, didn't update the config file
echo '{"error":"Server error! Didnt install!"}';
}
开发者ID:kevinjpetersen,项目名称:configity-server,代码行数:31,代码来源:install.php
示例11: InputForm
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Update guestbook configuration //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['config']) && is_array($_POST['config'])) {
if (write_ini_file($_POST['config'], CONFIG_PATH . 'guestbook.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
} else {
rcms_showAdminMessage(__('Error occurred'));
}
}
////////////////////////////////////////////////////////////////////////////////
// Interface generation //
////////////////////////////////////////////////////////////////////////////////
$config = parse_ini_file(CONFIG_PATH . 'guestbook.ini');
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Guest book configuration'));
$frm->addrow(__('Maximum message length'), $frm->text_box('config[max_message_len]', $config['max_message_len'], 5));
$frm->addrow(__('Maximum word length'), $frm->text_box('config[max_word_len]', $config['max_word_len'], 4));
$frm->addrow(__('Maximum size of database (in messages)'), $frm->text_box('config[max_db_size]', $config['max_db_size'], 5));
$frm->addbreak(__('Configuration') . ' bbcodes');
$frm->addrow(__('Enable nl2br and bbCodes') . __(' (except images)'), $frm->checkbox('config[bbcodes]', '1', '', @$config['bbcodes'], 4));
$frm->addrow(__('Enable all') . ' bbcodes', $frm->checkbox('config[links]', '1', '', @$config['links'], 4));
$frm->show();
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:30,代码来源:guestbook.php
示例12: registerUser
function registerUser($username, $nickname, $password, $confirm, $email, $userdata)
{
$username = basename($username);
$nickname = empty($nickname) ? $username : mb_substr(trim($nickname), 0, 50);
if (preg_match("/[^(\\w)|(\\x7F-\\xFF)|(\\-)]/", $nickname)) {
$this->results['registration'] = __('Invalid nickname');
return false;
}
if (empty($username) || preg_replace("/[\\d\\w]+/i", '', $username) != '' || mb_strlen($username) > 50 || $username == 'guest') {
$this->results['registration'] = __('Invalid username');
return false;
}
if ($this->is_user($username)) {
$this->results['registration'] = __('User with this username already exists');
return false;
}
if (!user_check_nick_in_cache($username, $nickname, $cache)) {
$this->results['registration'] = __('User with this nickname already exists');
return false;
}
if (empty($email) || !rcms_is_valid_email($email)) {
$this->results['registration'] = __('Invalid e-mail address');
return false;
}
if (!user_check_email_in_cache($username, $email, $cache)) {
$this->results['registration'] = __('This e-mail address already registered');
return false;
}
if (!empty($this->config['regconf'])) {
$password = $confirm = rcms_random_string(8);
}
if (empty($password) || empty($confirm) || $password != $confirm) {
$this->results['registration'] = __('Password doesnot match it\'s confirmation');
return false;
}
// If our user is first - we must set him an admin rights
if ($this->is_empty_users()) {
$_userdata['admin'] = '*';
$arr_conf = parse_ini_file(CONFIG_PATH . 'config.ini');
$arr_conf['admin_email'] = $email;
write_ini_file($arr_conf, CONFIG_PATH . 'config.ini');
} else {
$_userdata['admin'] = ' ';
}
// Also we must set a md5 hash of user's password to userdata
$_userdata['password'] = md5($password);
$_userdata['nickname'] = $nickname;
$_userdata['username'] = $username;
$_userdata['email'] = $email;
// Parse some system fields
$userdata['hideemail'] = empty($userdata['hideemail']) ? '0' : '1';
$userdata['tz'] = (double) @$userdata['tz'];
foreach ($this->profile_fields as $field => $acc) {
if ($acc <= USERS_ALLOW_SET || $acc == USERS_ALLOW_CHANGE) {
if (!isset($userdata[$field])) {
$userdata[$field] = $this->profile_defaults[$field];
} else {
$_userdata[$field] = strip_tags(trim($userdata[$field]));
}
}
}
foreach ($this->data['apf'] as $field => $desc) {
$_userdata[$field] = strip_tags(trim($userdata[$field]));
}
if (!$this->save_user($username, $_userdata)) {
$this->results['registration'] = __('Cannot save profile');
return false;
}
user_register_in_cache($username, $nickname, $email, $cache);
if (!empty($this->config['regconf'])) {
$site_url = parse_url($this->url);
rcms_send_mail($email, 'no_reply@' . $site_url['host'], __('Password'), $this->config['encoding'], __('Your password at') . ' ' . $site_url['host'], __('Your username at') . ' ' . $site_url['host'] . ': ' . $username . "\r\n" . __('Your password at') . ' ' . $site_url['host'] . ': ' . $password);
}
$this->results['registration'] = __('Registration complete. You can now login with your username and password.');
rcms_log_put(__('Notification'), $this->user['username'], 'Registered account ' . $username);
return true;
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:77,代码来源:user-classes.php
示例13: str_replace
break;
case 'combobox':
$setting[$key]['value'] = $_POST[$key];
break;
case 'scandir':
$setting[$key]['value'] = $_POST[$key];
break;
default:
$e4ver = str_replace('"', "'", $_POST[$key]);
if (trim($setting[$key]['regular'])) {
if (preg_match($setting[$key]['regular'], $_POST[$key])) {
$setting[$key]['value'] = $e4ver;
} else {
$text .= $setting[$key]['rule'] . '<br>';
}
} else {
$setting[$key]['value'] = $e4ver;
}
}
}
if ($text) {
form("label", $text . '<br><a href="' . href(THIS, 2) . '">Назад</a>');
} else {
write_ini_file($setting, $adj);
header("location:" . href(THIS, 1));
}
}
}
} else {
hrml(error(403));
}
开发者ID:cheevauva,项目名称:trash,代码行数:31,代码来源:index.php
示例14: Save_Config_Settings
function Save_Config_Settings()
{
$config_settings_file_path = "config/config_settings.php";
$config_database_file_path = "config/config_database.php";
return write_ini_file($config_settings_file_path, $GLOBALS['config_settings']);
}
开发者ID:babbottscott,项目名称:X-Ray-Detective,代码行数:6,代码来源:core_config_handler.php
示例15: array
<?php
//获取用户提交的东西后
//试着下载
//print_r(parse_ini_file("TdxApi.License",true));
$sampleData = array('License' => array('ExpireDate' => $_POST['ExpireDate'], 'Trial' => $_POST['Trial'], 'MachineID' => $_POST['MachineID']), 'User' => array('Account' => $_POST['Account'], 'UserName' => $_POST['UserName']));
write_ini_file($sampleData, 'TdxApi.License', true);
echo exec('License.exe --License "TdxApi.License" --PrivateKey "TdxApi.PrivateKey"');
//打包两个文件
//exec();
function write_ini_file($assoc_arr, $path, $has_sections = FALSE)
{
$content = "";
if ($has_sections) {
foreach ($assoc_arr as $key => $elem) {
$content .= "[" . $key . "]\n";
foreach ($elem as $key2 => $elem2) {
if (is_array($elem2)) {
for ($i = 0; $i < count($elem2); $i++) {
$content .= $key2 . "[] = \"" . $elem2[$i] . "\"\n";
}
} else {
if ($elem2 == "") {
$content .= $key2 . " = \n";
} else {
$content .= $key2 . " = \"" . $elem2 . "\"\n";
}
}
}
}
} else {
开发者ID:Strongc,项目名称:XAPI2,代码行数:31,代码来源:test.php
示例16: save_config
function save_config($type = 'ini')
{
global $INI;
$q = array('db' => $INI['db'], 'memcache' => $INI['memcache']);
if (strtoupper($type) == 'INI') {
if (!is_writeable(SYS_INIFILE)) {
return false;
}
return write_ini_file($q, SYS_INIFILE);
}
if (strtoupper($type) == 'PHP') {
if (!is_writeable(SYS_PHPFILE)) {
return false;
}
return write_php_file($q, SYS_PHPFILE);
}
return false;
}
开发者ID:jowino,项目名称:bd786110cact,代码行数:18,代码来源:common.php
示例17: build_installer
function build_installer($step)
{
switch ($step) {
case 0:
return <<<HTML
<div class="message">
<h2>Welcome to Tower21 WebComiX Manager</h2>
<p>The following pages are designed to assist you in setting up your server to run this application. The application will assist you and your users in managing WebComiX and related projects.</p>
<div align=center><button onclick="window.location='http://www.tower21studios.com'">Cancel</button> <button onclick="window.location='./app.php?action=install&step=1'">Get Started</button></div>
</div>
HTML;
break;
case 1:
$types = pdo_drivers();
@($host = getenv("IP"));
@($uname = getenv("C9_USER"));
$drivers = null;
foreach ($types as $driver) {
$drivers .= "<option>{$driver}</option>\n";
}
return <<<HTML
<form action="./app.php?action=install&step=2" method="post"><div class="form">
<h2>Set-up DataConnect</h2>
<p>This page is designed to help you set-up DataConnect to connect to the database software on your server. Please fill out the form below. Fields marked with and astrix '<span class="required">*</span>' are required.</p>
<table width="100%" border=0 cellspacing=1 cellpadding=1>
<tr>
<th colspan=2>Server</th>
</tr>
<tr>
<td align=right>Server Type<span class="required">*</span>:</td><td align=left><select required="required" name="database[driver]">{$drivers}</select></td>
</tr>
<tr>
<td align=right>Hostname/Address<span class="required">*</span>:</td><td align=left><input type="text" required="required" name="database[host]" value="{$host}"/></td>
</tr>
<tr>
<td align="right">Port:</td><td align="left"><input type="number" name="database[port]"></td>
</tr>
<tr>
<th colspan="2">Schema</th>
</tr>
<tr>
<td align="right">Database Name<span class="required">*</span>:</td><td align="left"><input type="text" required="required" name="schema[name]"/></td>
</tr>
<tr>
<td align="right">User<span class="required">*</span>:</td><td align="left"><input type="text" required=required name="schema[username]" value="{$uname}"/></td>
</tr>
<tr>
<td align="right">Password:</td><td align="left"><input type="password" name="schema[password]"/></td>
</tr>
<tr>
<td align="right">Table Prefix:</td><td align="left"><input type="text" name="schema[tableprefix]"/></td>
</tr>
<tr>
<td align="right"><button onclick="history.back()">Previous</button></td><td align="left"><button type="submit">Continue</button></td>
</tr>
</div></form>
HTML;
break;
case 2:
if (!empty($_POST['database'])) {
if (is_writable(dirname(__FILE__) . "/dataconnect/")) {
if (write_ini_file($_POST, dirname(__FILE__) . "/dataconnect/connect.ini")) {
header("Location:./app.php?action=install&step=2");
}
}
} else {
return <<<HTML
<div class="message">
<h2>Create Database Tables</h2>
<p>With DataConnect set up you are now ready to create the tables that the WebComiX Manager requires in order to function. This may take a few moments.</p>
<div align=center><button onclick="history.back()">Previous</button> <button onclick="window.location='./app.php?action=install&step=3'">Continue</button></div>
</div>
HTML;
}
break;
case 3:
if (set_tables()) {
$wcmroot = dirname($_SERVER['SCRIPT_FILENAME']);
$wcmuri = $_SERVER['SERVER_NAME'] . dirname($_SERVER['REQUEST_URI']);
return <<<HTML
<form action="./app.php?action=install&step=4" method="post"><div class="form">
<h2>Populate Tables</h2>
<p>Now that the database tables have been created we are ready to populate them with their default data, however, we need to know what some of that data should be. Fill out the form below to help us.</p>
<table width=100% border=0 cellspacing=1 cellpadding=1>
<tr>
<th colspan=2>Application Settings</th>
</tr>
<tr>
<td align="right">Base URI:</td><td align="left"><input type="text" name="settings[base_uri]" title="The root location this application is run from including domain/ip address and root application folder" value="{$wcmuri}"></td>
</tr>
<tr>
<td align="right">Server Root:</td><td align="left"><input type="text" name="settings[base_dir]" title="The actual folder the application is stored in on the server. Setting this prevents the application from guessing where it is, but could pose a security risk." value="{$wcmroot}"/></td>
</tr>
<tr>
<td align="right">Projects Folder:</td><td align="left"><input type="text" name="settings[project_dir]" title="Root folder where files (PDF, Graphics, etc.) are stored for user projects relative to the server root." value="{$wcmroot}/projects"/></td>
</tr>
<tr>
<td align="right">Allow Guest Views:</td><td align="left"><span title="Can users view ad-supported content without registering?"><input type="radio" name="settings[guest_views]" value="y" id="guest_y"><label for="guest_y">Yes</label><input type="radio" name="settings[guest_views]" value="n" id="guest_n"><label for="guest_n">No</label></span></td>
</tr>
<tr>
//.........这里部分代码省略.........
开发者ID:jjon-saxton,项目名称:webcomicmanager,代码行数:101,代码来源:install.inc.php
示例18: InputForm
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['nconfig']) && write_ini_file($_POST['nconfig'], CONFIG_PATH . 'search.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
}
$system->config = parse_ini_file(CONFIG_PATH . 'search.ini');
$config =& $system->config;
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Search engine configuration'));
$frm->addrow(__('Allow guests use searching'), $frm->checkbox('nconfig[guest]', '1', '', @$config['guest']));
$frm->addrow(__('Allow chose search source'), $frm->checkbox('nconfig[chose]', '1', '', @$config['chose']));
$frm->addrow(__('Check access level before search in article'), $frm->checkbox('nconfig[access]', '1', '', @$config['access']));
$frm->addrow(__('Min length'), $frm->text_box("nconfig[min]", @$config['min']));
$frm->addrow(__('Max length'), $frm->text_box("nconfig[max]", @$config['max']));
$frm->addrow(__('Output block length'), $frm->text_box("nconfig[block]", @$config['block']));
$frm->addrow(__('Editbox width'), $frm->text_box("nconfig[width]", @$config['width']));
$frm->show();
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:23,代码来源:search.php
示例19: elseif
}
break;
//---------------------------------------------------------
// Query = changepwd
//---------------------------------------------------------
// Query = changepwd
case "changepwd":
if (!isset($_POST['password'])) {
$display = "changePasswordPage";
} elseif (empty($_POST['password'])) {
$error[] = "The administration password cannot be empty. Go back to the <a href=\"admin.php?changepwd\">Change Password</a> page.";
$display = "errorPage";
} else {
$_SESSION['settings']['Admin.Password'] = hash("sha256", $_POST['password']);
// Persist the password into the settings file
write_ini_file($_SESSION['settings'], GIMMETHEFILE_SETTINGS);
$display = "passwordChangedPage";
}
break;
//---------------------------------------------------------
// Query = home
//---------------------------------------------------------
// Query = home
case "home":
$display = "homePage";
break;
//---------------------------------------------------------
// Query = logout
//---------------------------------------------------------
// Query = logout
case "logout":
开发者ID:Hadryan,项目名称:GimmeTheFile,代码行数:31,代码来源:admin.php
示例20: session_id
$path = $path . "/" . session_id();
if (!file_exists($path)) {
mkdir($path);
}
$Product = $row[strtolower("Product")];
$path1 = "{$path}/{$Product}.License";
$path2 = "{$path}/{$Product}.Signature";
?>
<!DOCTYPE HTML><html>
<head>
<meta charset="UTF-8">
<title>授权生成</title>
</head>
<body>
<?php
if (write_ini_file(json_decode($content2, true), $path1, true)) {
$LicensePath = $path1;
echo "生成授权文件成功<br/>";
$cmd = "cscript.exe {$VbsPath} \"{$LicensePath}\"";
$ret = exec($cmd);
//echo $ret;
if ("OK" == $ret) {
echo "编码转换成功<br/>";
} else {
echo "编码转换失败<br/>";
return;
}
echo "<a href={$path1}>下载License文件,请鼠标右键->链接另存为</a><br/>";
$PrivateKeyPath = "{$PrivateKeyDir}\\{$Product}\\{$Product}.PrivateKey";
$cmd = "{$ExePath} --License \"{$LicensePath}\" --PrivateKey \"{$PrivateKeyPath}\" ";
$ret = exec($cmd);
开发者ID:renkun-ken,项目名称:XAPI2,代码行数:31,代码来源:LicenseInfoGenerate.php
注:本文中的write_ini_file函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论