奶头挺立呻吟高潮av全片,成人试看120秒体验区,性欧美极品v,A片高潮抽搐揉捏奶头视频

php語(yǔ)言

php生成sitemap.xml的實(shí)例代碼

時(shí)間:2024-06-02 18:48:00 php語(yǔ)言 我要投稿
  • 相關(guān)推薦

php生成sitemap.xml的實(shí)例代碼

  本文分享一個(gè)自己寫(xiě)的生成sitemap.xml文件的php代碼,感興趣的朋友可以參考下。

  本節(jié)內(nèi)容:

  php生成sitemap.xml

  例子:

  復(fù)制代碼 代碼示例:

  <?PHP

  /**

  * 生成sitemap.xml文件

  */

  $content='<?xml version="1.0" encoding="UTF-8"?>

  <urlset

  xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9

  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

  ';

  $data_array=array(

  array(

  'loc'=>'http://www.jbxue.com/',

  'priority'=>'1.0',

  'lastmod'=>'2012-06-03T04:20:32-08:00',

  'changefreq'=>'always'

  ),

  array(

  'loc'=>'http://www.jbxue.com/',

  'priority'=>'0.5',

  'lastmod'=>'2012-06-03T04:20:32-08:00',

  'changefreq'=>'daily'

  )

  );

  foreach($data_array as $data){

  $content.=create_item($data);

  }

  $content.='</urlset>';

  $fp=fopen('sitemap.xml','w+');

  fwrite($fp,$content);

  fclose($fp);

  function create_item($data){

  $item="<url>\n";

  $item.="<loc>".$data['loc']."</loc>\n";

  $item.="<priority>".$data['priority']."</priority>\n";

  $item.="<lastmod>".$data['lastmod']."</lastmod>\n";

  $item.="<changefreq>".$data['changefreq']."</changefreq>\n";

  $item.="</url>\n";

  return $item;

  }

  Sitemap.xml 制作完成后,將xml文件提交到相關(guān)搜索引擎以方便搜索引擎更快速的收錄。

  常見(jiàn)的搜索引擎的sitemap的提交地址。

  Google 提交地址:http://www.google.com/webmasters/sitemaps/?hl=zh-CN

  Yahoo 提交地址:http://sitemap.cn.yahoo.com/

  提交后,一般在幾個(gè)小時(shí)之內(nèi),系統(tǒng)就開(kāi)始下載處理了。

  sitemap.xml的作用,參考:http://baike.baidu.com/view/1072062.htm

【php生成sitemap.xml的實(shí)例代碼】相關(guān)文章:

php動(dòng)態(tài)生成JavaScript代碼10-03

PHP生成器簡(jiǎn)單實(shí)例09-07

php中使用redis隊(duì)列操作實(shí)例代碼05-16

php生成高清縮略圖實(shí)例08-12

php獲取新浪微博數(shù)據(jù)API的實(shí)例代碼08-06

php生成縮略圖的兩種方法(代碼)08-08

php語(yǔ)言字典代碼06-08

PHP socket的配置及實(shí)例10-16

php查詢mysql的實(shí)例09-09

php生成動(dòng)態(tài)圖片驗(yàn)證碼的一段代碼04-30

主站蜘蛛池模板: 开江县| 武胜县| 禹城市| 炉霍县| 阿拉尔市| 鹤壁市| 丹江口市| 保亭| 抚顺市| 保康县| 衡阳市| 江北区| 江安县| 菏泽市| 旌德县| 达拉特旗| 乃东县| 吉林市| 奉节县| 札达县| 兰坪| 太和县| 鞍山市| 泰兴市| 察雅县| 万宁市| 嘉峪关市| 临沂市| 武义县| 泊头市| 临泽县| 北海市| 蒙城县| 古浪县| 彭泽县| 乌兰县| 阳谷县| 昭通市| 淮安市| 毕节市| 佳木斯市|