dedecms打开绝对路径就出现源代码,怎么解决

dedecms打开绝对路径就出现源代码,怎么解决,第1张

Hi,可以使用dedecms后台的单页面做

我把源码贴给你吧

这是txt版本的,

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

{dede:channel type='top' row='13'}[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='1'}[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='2' }[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='3' }[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='19' }[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='15' }[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='4' }[field:typeurl/]

{/dede:channel}{dede:channel type='son' row='10' typeid='5' }[field:typeurl/]

{/dede:channel}{dede:arclist row='3000' typeid='1' orderby='pubdate'}

[field:arcurl/]

{/dede:arclist}{dede:arclist row='3000' typeid='2' orderby='pubdate'}

[field:arcurl/]

{/dede:arclist}{dede:arclist row='3000' typeid='3' orderby='pubdate'}

[field:arcurl/]

{/dede:arclist}{dede:arclist row='3000' typeid='5' orderby='pubdate'}

[field:arcurl/]

{/dede:arclist}{dede:arclist row='3000' typeid='19' orderby='pubdate'}

[field:arcurl/]

{/dede:arclist}{dede:arclist row='3000' typeid='4' orderby='pubdate'}

[field:arcurl/]

{/dede:arclist}

这是xml版本的

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

<xml version="10" encoding="gb2312">

<xml-stylesheet type="text/xsl" href="sitemapxsl">

<urlset xmlns="

<url>

<loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{dede:channelartlist row='13'}

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='1'}

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='2' }

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='3' }

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='19' }

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='15' }

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='4' }

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:channelartlist type='son' row='10' typeid='5' }

<url>

<loc>{dede:field name='typeurl'/}</loc>

<priority>10</priority>

<lastmod>{dede:php} $_date = date('Y-m-d',time());

echo $_date;

{/dede:php}</lastmod>

<changefreq>Always</changefreq>

</url>

{/dede:channelartlist}

{dede:arclist row='3000' typeid='1' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

{dede:arclist row='3000' typeid='2' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

{dede:arclist row='3000' typeid='3' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

{dede:arclist row='3000' typeid='5' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

{dede:arclist row='3000' typeid='19' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

{dede:arclist row='3000' typeid='4' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

{dede:arclist row='3000' typeid='15' orderby='pubdate'}

<url>

<loc>[field:arcurl/]</loc>

<priority>08</priority>

<lastmod>[field:pubdate function=mydate('Y-m-d',@me)/]</lastmod>

<changefreq>daily</changefreq>

</url>

{/dede:arclist}

</urlset>

HTML的版本

<!doctype html>

<html lang="zh-cn">

<head>

<meta charset="gb2312">

<title>{dede:globalcfg_webname/}</title>

<meta name="keywords" content="{dede:globalcfg_keywords/}" />

<meta name="description" content="{dede:globalcfg_description/}" />

<meta name="Author" content="杨雨">

<meta name="Copyright" content="http://itbyccom">

</head>

<body>

<h1><a title="{dede:globalcfg_webname/}" href="

{dede:globalcfg_webname/}</a></h1>

<nav>

{dede:channelartlist }

<ul onmouseover="ShowMenuDd(this)" class="repeatItem">

<li><a title="{dede:field name='typename'/}" href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></li>

<li><ol>{dede:sql sql='Select from `dede_arctype` where reid=~id~ ORDER BY id'}

<li>

<a class="link" href="[field:typedir function="cn_substr(@me,200,9) " /]">[field:typename/]</a>

</li>

{/dede:sql}</ol></li>

</ul>

{/dede:channelartlist}

</nav>

<div>

<ol>{dede:arclist orderby='pubdate' row=100000 }

<li>

<a title="[field:fulltitle/]" href="[field:arcurl/]">[field:fulltitle/]</a>

<time>[field:pubdate function=MyDate('y-m-d',@me)/]</time>

</li>{/dede:arclist}

</ol>

</div>

</body>

</html>

具体提示什么呢?会不会是织梦模版的问题?

如果是源码模版的问题,您可以去随便撸源码分享平台找款免费的精品织梦模版来试用下

如果您能附上问题图的话,那还能给您看看是那里的问题!

貌似这个需要在服务器上设置吧

类似于设置404跳转的概念

好像服务器安全狗软件有这个功能

安全狗可以拒绝访问htm文件,不过没有试过跳转到首页

另外,访客一般是不会直接访问你的模板文件的

如果只是要实现保护模板的话,直接服务器上设置不允许访问htm格式的文件就可以了

或者模板名称改成个性的名称,别人就无法猜到你的模板文件名,也就起到保护作用了

多素材织梦模板

为您解答

望采纳

{dede:channelartlist pagesize='20' row='20'}

<li><a href="[field:typelink/]" id="nav_[field:global name=autoindex/]" onmouseover="showMenu('nav_[field:global name=autoindex/]','subnav[field:global name=autoindex/]')">第一章</a>

<div class="subnav disable" id="subnav[field:global name=autoindex/]">

<p class="pointer"></p>

<p><span>

{dede:arclist row='4' orderby='pundate'}

<a href="[field:arcurl/]">[field:title /]</a> |

{/dede:arclist}

</span></p>

</div>

</li>

{/dede:channelartlist}

测试 ok的,没问题 样式不一样的是数字,数字是有规律的,递增,那直接用递增的标签就可以了,我已经加上了,你测试下,

不涉及侵权。

Dedecms(织梦)发布公告:除个人非盈利网站外,均需要购买DedeCMS商业使用授权,授权费为5800元。针对逾期未获得授权的网站,我们将保留民事索赔权利,届时除了需需要支付商业使用授权费外,您还需承担相应的合理维权费用。

软件著作权包括人身权和财产权,这是法律授予软件著作权的专有权利。人身权是指发表权、开发者身份权。财产权是指使用权、使用许可和获得报酬权、转让权。发表权:即决定软件是否公之于众的权利。开发者身份权:即表明开发者身份的权利以及在其软件上署名的权利。使用权:即在不损害社会公共利益的前提下,以复制、展示、发行、修改、翻译、注释等方式使用其软件的权利。使用许可权和获得报酬权,即许可他人以本条第(三)项中规定的部分或者全部方式使用其软件的权利和由此而获得报酬的权利。转让权是指权利人向他人同时转让使用权、使用许可和获得报酬权,即将所有的财产权让予他人。你未经著作权人许可,修改并使用软件程序,是侵权行为。

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
网站模板库 » dedecms打开绝对路径就出现源代码,怎么解决

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情