phptid
① 織夢系統中,plus/list.phptid=1中,tid=任何數字時候都跳到tid=100
網路知道有網友提問的問題,想在前台把DEDECMS的自定義表單提交的內容顯示出來並分頁.幫他寫了一下.
根目錄建立form.php
1
2
3
4
5
6
7
8
9
10
<?php
require_once('/include/common.inc.php');
require_once(DEDEINC.'/datalistcp.class.php');
$sql = "Select * From `dede_diyform1`";//可以接著加條件 例如order by id desc 排序
$dlist = new DataListCP();
$dlist->SetTemplet("templets/plus/form.htm");
$dlist->SetSource($sql);
$dlist->display();
?>
form.htm 放到templets/plus目錄下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{dede:config.pagesize value='5'/}<!--這里設置每頁顯示的條數-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>翻頁</title>
</head>
<body>
<ul>
{dede:datalist}
<li>{dede:field.name /}-----{dede:field.sex /}<li>
{/dede:datalist}
</ul>
{dede:pagelist listsize=5/}
</body>
</html>
{dede:field.name /}和{dede:field.sex /} 根據你自己的自定義表單欄位來填寫.
例如 我的自定義表單1里就加了2個欄位
後台的數據
是不是非常簡單,翻頁的樣式自己寫個CSS 就搞定了.
http://www.dede58.com/a/mengjiaocheng/development/3574.html
② 在php裡面的「/list.phptid=297」路徑怎麼理解
根目錄下的list.php文件,?後的tid是GET傳遞的參數tid等於297.
③ 織夢的網站後台php文件list.phptid=36
它的真實名字是list.php
?tid=36隻是他的參數。
在plus文件夾裡面就找到了。
④ PHP 獲取 tid 的值
你這個是2維數組 比如 $a = Array ( [21] => stdClass Object ( [tid] => 21 [vid] => 3 [name] => AL [description] => [format] => [weight] => 0 [vocabulary_machine_name] => state ) );
echo $a[21]['tid'];
⑤ 求這段php代碼怎麼解密,分別用什麼軟體工具加密、解密
新建一個PHP文件,然後粘貼如下代碼:<?php
echo base64_decode(rawurldecode('c3R5bGU%%2B'));
?>
執行就解密了,你會發現代碼中加密部分只是幾個鏈接。本來可解密好給你的,但是有鏈接網路知道發不了
補充,還是解了下,發出來,其中的兩個論壇的鏈接我去掉了:
<?php
require_once('global.php');
require_once(R_P.'require/header.php');
$newtids='
<style type="text/css">.newtids {width:100%;}.newtids li{width:45%;float:left;padding:0 2.5%}.newtids li em{float:right;}.newtids li em a{color:#ccc;}.frendlinks{position: absolute;top: -9999px;left:-9999px;}</style><ul class="newtids"><h2 class="frendlinks"><a href="#">重慶論壇</a> <a href="#">蘇州論壇</a></h2>';
if($newtids)
{$query = $db->query("SELECT * FROM pw_threads ORDER BY postdate DESC LIMIT 0 , 200");
while ($rt = $db->fetch_array($query)){
$newtids .= '<li><em><a href="thread.php?fid='.$rt['fid'].'" target="_blank">'.$rt['author'].'</a></em><a href="read.php?tid='.$rt['tid'].'" target="_blank">'.$rt['subject'].'</a></li>';
}
$newtids.='</ul>';
echo $newtids;}
footer();?>
⑥ 為什麼我的網站網址帶 plus/list.phptid=1 什麼意思
plus/list.php?tid=1
plus:網站當前路徑下的plus路徑
list.php:plus路徑下的list.php文件
?tid=1:傳遞給list.php的參數,參數名稱:tid,參數值:1