當前位置: 首頁>>代碼示例>>PHP>>正文


PHP config::create方法代碼示例

本文整理匯總了PHP中config::create方法的典型用法代碼示例。如果您正苦於以下問題:PHP config::create方法的具體用法?PHP config::create怎麽用?PHP config::create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在config的用法示例。


在下文中一共展示了config::create方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<?php

/************************************************************************
 * Dashboard2
 * Copyright 2006-2010 by Niels Leenheer
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.	 
 */
config::create('redirectToLogin', 'boolean', true);
/* Dutch language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='login', value='Inloggen'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='logout', value='Uitloggen'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='username', value='Gebruikersnaam'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='password', value='Wachtwoord'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='rememberpassword', value='Wachtwoord onthouden'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='passwordnotcorrect', value='De door u opgegeven gebruikersnaam of het door u opgegeven wachtwoord is niet correct.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='anerroroccured', value='Er is een fout opgetreden'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='notenoughrights', value='U heeft niet voldoende rechten.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='logintoview', value='Log in om deze pagina te openen.'");
/* English language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='login', value='Login'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='logout', value='Logout'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='username', value='Username'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='password', value='Password'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='rememberpassword', value='Remember password'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='passwordnotcorrect', value='The supplied username or password is not correct.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='anerroroccured', value='An error occured'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='notenoughrights', value='You are not allowed to view this page.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='logintoview', value='Log in to open this page.'");
開發者ID:KasaiDot,項目名稱:Dashboard2,代碼行數:31,代碼來源:install.php

示例2: int

<?php

/************************************************************************
 * Dashboard2
 * Copyright 2006-2010 by Niels Leenheer
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.	 
 */
sql::create("contents_links", "\r\n\t\t`ID` int(11) NOT NULL default '0',\r\n\t\t`revision` int(11) NOT NULL default '0',\r\n\t\t`link` int(11) NOT NULL auto_increment,\r\n\t\t`position` int(11) NOT NULL default '0',\r\n\t\t`url` varchar(255) NOT NULL default '',\r\n\t\t`title` varchar(255) NOT NULL default '',\r\n\t\t`target` varchar(16) NOT NULL default '',\r\n\t\tUNIQUE KEY `id_revision_link` (`ID`,`revision`,`link`)\r\n\t");
config::create('linksAlign', 'string', 'right');
/* Dutch language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='links', value='Links'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='linksurl', value='Adres'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='linkstarget', value='Doel'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='newwindow', value='Nieuw venster'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='currentwindow', value='Hetzelfde venster'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='linksdraganddrop', value='Klik op een link om te wijzigen of sleep de links naar de gewenste positie'");
/* English language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='links', value='Links'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='linksurl', value='URL'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='linkstarget', value='Target'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='newwindow', value='New window'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='currentwindow', value='Current window'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='linksdraganddrop', value='Click a link to edit it or drag and drop the links in the order you want'");
開發者ID:KasaiDot,項目名稱:Dashboard2,代碼行數:26,代碼來源:install.php

示例3:

<?php

/************************************************************************
 * Dashboard2
 * Copyright 2006-2010 by Niels Leenheer
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.	 
 */
config::create('installed', 'boolean', true);
config::create('inlineLogin', 'boolean', false);
config::create('inlineLogout', 'boolean', false);
config::create('multiLanguageSupport', 'boolean', false);
config::create('showLastModified', 'boolean', true);
config::create('siteTitle', 'string', 'Acme Cogs, Ltd.');
開發者ID:KasaiDot,項目名稱:Dashboard2,代碼行數:16,代碼來源:create-configuration.php

示例4:

<?php

/************************************************************************
 * Dashboard2
 * Copyright 2006-2010 by Niels Leenheer
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.	 
 */
config::create('analyticsId', 'string', '');
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='analytics', value='Analytics'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='analyticsId', value='Web Property ID'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='analytics', value='Analytics'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='analyticsId', value='Web Property ID'");
開發者ID:KasaiDot,項目名稱:Dashboard2,代碼行數:15,代碼來源:install.php


注:本文中的config::create方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。