本文整理汇总了PHP中CUrl::get_urlsite方法的典型用法代码示例。如果您正苦于以下问题:PHP CUrl::get_urlsite方法的具体用法?PHP CUrl::get_urlsite怎么用?PHP CUrl::get_urlsite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUrl
的用法示例。
在下文中一共展示了CUrl::get_urlsite方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
function create($sitemap_name = '') {
if(!$sitemap_name) $sitemap_name = SS_ADMIN_TO_USERFILE . "/sitemap.xml";
if(empty($sitemap_name)) $sitemap_name = "sitemap_" . $rep_name . ".xml";
$changefreq = array('daily', 'weekly', 'monthly');
$priority = array('0.1', '0.5', '1.0');
$tab_archive = array();
rsort($tab_archive);
$xml = simplexml_load_file(SS_ADMIN_TO_USERFILE . '/google/sitemap_base.xml');
//scan bdd
$sql = "SELECT * FROM page WHERE etat = 1";
$res = CBdd::select($sql);
while($page = mysql_fetch_array($res)) {
$url = $xml->addChild('url');
$url->addChild('loc', CUrl::get_urlsite() . "/" . CFunction::formate_chaine(utf8_decode($page['nom']), '-') . "_p" . $page['id']. ".html");
$url->addChild('lastmod', CDate::formate_date($page['date']));
$url->addChild('changefreq', $changefreq[rand(0, 2)]);
$url->addChild('priority', $priority[rand(0, 2)]);
}
$html = $xml->asXML();
file_put_contents($sitemap_name, $html);
}
示例2:
<script type="text/javascript" src="../plug/popup/popup.js"></script>
<link href="../plug/jscalendar/calendar-win2k-1.css" rel="stylesheet" type="text/css"/>
<link href="../plug/jquery/css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../plug/popup/popup.js"></script>
<script type="text/javascript" src="../plug/jquery/js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="../plug/jquery/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="../plug/jquery/js/ui/i18n/ui.datepicker-fr.js"></script>
<script type="text/javascript" src="../plug/jquery/js/jquery.form.js"></script>
<script type="text/javascript" src="../plug/panther/campagne.js"></script>
<script type="text/javascript" src="../plug/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "exact",
elements : "expediteur_publipostage, objet_publipostage, message_publipostage",
theme : "advanced",
document_base_url : "<?php echo CUrl::get_urlsite() ?>",
relative_urls : false,
remove_script_host : false,
plugins :"safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager,fullpage",
theme_advanced_buttons1 : "bold,italic,underline,pastetext,separator,strikethroughjustifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink,styleselect,formatselect,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_align : "left",
theme_advanced_toolbar_location : "external"
});
</script>
<style type="text/css">
.margin-left {
margin-left:40px;
}
input[type='text'] {
示例3: include
<div id="signe"></div>
<div id="titre"><!-- InstanceBeginEditable name="titre" -->Sitemap<!-- InstanceEndEditable --></div>
</div>
</div>
<div id="contentarea">
<div id="left"><?php include("../nav/menu_g.php"); ?></div>
<div id="center">
<div id="page"><!-- InstanceBeginEditable name="page" --><?php echo CHtml::get_toolbar(array('add'=>1, 'add_label'=>'Gégérer')) ?><!-- InstanceEndEditable --></div>
<div id="over"><!-- InstanceBeginEditable name="over" --><?php echo CHtml::get_msginfo($msginfo) ?><!-- InstanceEndEditable --></div>
<div id="main"><!-- InstanceBeginEditable name="main" -->
<?php
$url = SS_ADMIN_TO_USERFILE . "/sitemap.xml";
if(is_file($url)) {
?>
<h2>Contenu du fichier <a href="<?php echo $url ?>" target="_blank"><?php echo CUrl::get_urlsite() . "/sitemap.xml" ?></a></h2>
<table style="width: 875px; margin-left: 1px;" border="1" cellpadding="0" cellspacing="0">
<tr align="center">
<th align="left">Url du fichier</th>
<th>Fréquence changement</th>
<th>Priorité d'exploration</th>
<th>Derniere modification</th>
</tr>
<?php
$xml = simplexml_load_file($url);
foreach($xml->url as $url) {
$loc = strtolower(utf8_decode($url->loc));
$lastmod = strtolower(utf8_decode($url->lastmod));
$changefreq = utf8_decode($url->changefreq);
$priority = utf8_decode($url->priority);?>
<tr>
示例4: include
</head>
<body>
<?php
/*------------------------------------------------------
IMPORTATIONS
--------------------------------------------------------*/
?>
<!-- InstanceBeginEditable name="php" -->
<?php
/*--------------------------------------------------------------------
INITIALISATIONS
----------------------------------------------------------------------*/
$msginfo = "";
$PATH_RACINE = CUrl::get_pathsite();
$URL_RACINE = CUrl::get_urlsite();
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
<div id="header"><?php include("../nav/header.php"); ?></div>
<div id="top"> </div>
<div id="filet">
<div id="zonetitre">
<div id="signe"></div>
<div id="titre"><!-- InstanceBeginEditable name="titre" -->Installation<!-- InstanceEndEditable --></div>
</div>
</div>
<div id="contentarea">
<div id="left"><?php include("menu_g.php"); ?></div>
<div id="center">
<div id="page"><!-- InstanceBeginEditable name="page" --><!-- InstanceEndEditable --></div>