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


PHP common::url方法代碼示例

本文整理匯總了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();
    }
開發者ID:laiello,項目名稱:phpbf,代碼行數:11,代碼來源:class.common.php

示例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>';
開發者ID:laiello,項目名稱:phpbf,代碼行數:10,代碼來源:view.config_saved.php

示例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']) {
開發者ID:laiello,項目名稱:phpbf,代碼行數:31,代碼來源:view.config.php

示例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>
';
開發者ID:laiello,項目名稱:phpbf,代碼行數:19,代碼來源:view.about.php

示例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>.
';
開發者ID:laiello,項目名稱:phpbf,代碼行數:11,代碼來源:view.backup.php

示例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/>';
開發者ID:laiello,項目名稱:phpbf,代碼行數:31,代碼來源:view.log.php

示例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\';"/>&nbsp;
	<input type="button" value="Cancel" onclick="document.location.href=\'' . common::url('self') . '?view=config\';"/>
	';
開發者ID:laiello,項目名稱:phpbf,代碼行數:12,代碼來源:view.rest_confirm.php

示例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() . ')&nbsp;&nbsp;&nbsp;&nbsp;<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>
開發者ID:laiello,項目名稱:phpbf,代碼行數:31,代碼來源:view.test.php


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