本文整理汇总了PHP中common::url方法的典型用法代码示例。如果您正苦于以下问题:PHP common::url方法的具体用法?PHP common::url怎么用?PHP common::url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common
的用法示例。
在下文中一共展示了common::url方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_footer
static function print_footer()
{
print '
</div>
<div class="footer">
' . common::get_version() . ' | <a href="' . common::url('website') . '">www.phpBF.net</a>
</div>
</body></html>
';
ob_flush();
}
示例2: htmlentities
<?php
if (LOGGED !== true) {
die;
}
print '
<h2>New configuration saved</h2>
To edit again, hit <a href="' . common::url('self') . '?view=config">Configure</a>. The new content of <i>config.php</i> is below. To access this values from you scripts, read the Configuration section in the doc.
<br/><br/>
<pre>' . htmlentities(file_get_contents(CONFIG_FILE)) . '</pre>';
示例3: foreach
if(rules[i].selectorText.toLowerCase()==".advanced"){
targetrule=rules[i]
break outer;
}
}
}
targetrule.style.display = advanced? "block":"none";
}
</script>';
print '<div style="float: left; width: 130px; margin-right: 20px;"><ul id="menu">';
foreach (config::$sections as $id => $sec) {
print '<li' . (isset($sec['advanced']) && $sec['advanced'] ? ' class="advanced"' : '') . '><a id="tabbutton_' . $id . '" ' . ($first == $id ? 'class="selected"' : '') . ' onclick="showtab(\'' . $id . '\');">' . $sec['title'] . '</a></li>';
}
print '</ul>';
print '<br/><a style="font-size: 80%;" href="' . common::url('self') . '?view=reset_confirm">Reset to default settings</a>';
print '</div><form action="' . common::url('self') . '?edit=config" method="post"><div style="position: absolute; right: 0; top: 40px; text-align:right; font-size: 90%;"><label>Show advanced options <input id="advancedButton" type="checkbox" onclick="switchAdvanced(this.checked);"/></label></div>';
print '<script language="javascript">switchAdvanced(get("advancedButton").checked);</script>';
foreach (config::$sections as $id_sec => $sec) {
if (!isset($sec['advanced'])) {
$sec['advanced'] = false;
}
print '<div' . ($sec['advanced'] ? ' class="advanced"' : '') . ' id="tab_' . $id_sec . '" style="float: left;width: 650px; margin-bottom: 30px; display: ' . ($first == $id_sec ? 'block' : 'none') . ';">';
foreach (config::$subsections[$id_sec] as $id_sub => $sub) {
if (!isset($sub['advanced'])) {
$sub['advanced'] = false;
}
if (!isset($sub['desc'])) {
$sub['desc'] = "";
}
print '<h3' . ($sec['advanced'] || $sub['advanced'] ? ' class="advanced"' : '') . '>' . $sub['title'] . '</h3>';
if ($sub['desc']) {
示例4:
<?php
if (LOGGED !== true) {
die;
}
print '
<h2>Thank for using the phpBF Framework</h2>
To get started click on <a href="' . common::url('self') . '?view=config">Configure</a>.
<br/><br/>
<b>Version:</b> ' . common::get_version() . '
<br/><br/>
<b>License</b>: <a href="' . common::url('self') . '?view=license">GNU Lesser General Public License v3</a>
<br/><br/>
Please help by reporting any bugs you encounter, and <a href="http://loicminghetti.net/en/contact" target="_blank">contact me</a> if you need any help ;-)
<br/><br/>
Project website: <a href="' . common::url('website') . '">' . common::url('website') . '</a>
<br/>
Project on sourceforge.net: <a href="' . common::url('sourceforge') . '">' . common::url('sourceforge') . '</a>
';
示例5:
<?php
if (LOGGED !== true) {
die;
}
print '
<h2>Backup</h2>
To download a complete backup of your website root, your server must be running on a linux OS and PHP must be allowed to execute shell commands.
<br/><br/>
<a href="' . common::url('self') . '?edit=backup">Download backup</a>.
';
示例6: get_file
<?php
if (LOGGED !== true) {
die;
}
$log = get_file("log", "errorlog.txt")->read();
$dom = new DOMDocument();
$dom->loadXML('<root>' . $log . '</root>');
print '
<h2>Error log (<a href="' . common::url('self') . '?edit=clear_log">clear</a>)</h2>
<ol>';
foreach ($dom->childNodes->item(0)->childNodes as $error) {
if (!$error instanceof DOMElement) {
continue;
}
print '<li>';
foreach ($error->childNodes as $line) {
if (!$line instanceof DOMElement) {
continue;
}
if ($line->tagName == 'trace') {
print 'Trace:<ul>';
foreach ($line->childNodes as $item) {
if (!$item instanceof DOMElement || trim($item->nodeValue) == '') {
continue;
}
print '<li>' . $item->nodeValue . '</li>';
}
print '</ul><br/>';
} else {
print $line->tagName . ': <b>' . $line->nodeValue . '</b><br/>';
示例7:
<?php
if (LOGGED !== true) {
die;
}
print '
<h2>Reset config file</h2>
Are you sure you want to reset config file with default values?<br/>It is recommended to backup config file first.
<br/><br/>
<input type="button" value="Reset" onclick="document.location.href=\'' . common::url('self') . '?edit=config\';"/>
<input type="button" value="Cancel" onclick="document.location.href=\'' . common::url('self') . '?view=config\';"/>
';
示例8:
table.tests td {
vertical-align: middle;
border-bottom: solid 1px #CCCCCC;
}
table.tests td.title {
width: 300px;
}
</style>';
print '
<h2>Test server configuration</h2>
This page gives you information about the server based on current configuration. Make sure you have no values in red otherwise the framework might not work properly. Values in orange might need your attention, but will not prevent the framework from working.';
print '<h3>Web server</h3>
<table cellspacing="0" cellpadding="5" class="tests"><tr>
<td class="title"><b>Running on Apache</b> (Recommended but not required)</td><td>' . (test::get_apache_version() ? test::ok() . " (" . test::get_apache_version() . ")" : test::warning("No")) . '</td>
</tr><tr>
<td class="title"><b>PHP Version</b> (Required 5.0+, recommended 5.2+)</td><td>' . (test::get_php_version() >= 5.0 ? test::get_php_version() >= 5.2 ? test::ok() : test::warning("OK") : test::invalid("No")) . ' (' . test::get_php_version() . ') <a href="' . common::url('self') . '?view=phpinfo">View PHP Info</a></td>
</tr><tr>
<td class="title"><b>Sessions</b> (Required)</td><td>' . (test::session_enabled() ? test::ok() : test::invalid()) . '</td>
</tr><tr>
<td class="title"><b>Magic quotes</b> (Recommended to be off)</td><td>' . (test::magic_quotes_on() ? test::warning("Turn off for better performance") : test::ok("OFF")) . '</td>
</tr></table>
<h3>Admin console and config file</h3>
<table cellspacing="0" cellpadding="5" class="tests"><tr>
<td class="title"><b>Valid path to root</b></td><td>' . (test::root_path_valid() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . PATH_TO_ROOT . '</i>)</td>
</tr><tr>
<td class="title"><b>Valid path to root for editing</b></td><td>' . (test::root_path_write_valid() ? test::ok("YES") : test::invalid("NO. Update will not work if it is not valid")) . ' (Path: <i>' . PATH_TO_ROOT_WRITE . '</i>)</td>
</tr><tr>
<td class="title"><b>Config file exists</b></td><td>' . (test::config_exists() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . CONFIG_FILE . '</i>)</td>
</tr><tr>
<td class="title"><b>Config file is writable</b> (though edit path)</td><td>' . (test::config_writable() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . CONFIG_FILE_WRITE . '</i>)</td>