原创 dedecms 後臺上傳圖片帶絕對網址

dedecms 後臺上傳圖片帶絕對網址 按目錄找到文件:/include/dialog/select_images_post.php ( 約108行處 ), 找到: $fileurl = $activepath.'/'.$filenam

原创 dede文章內容頁調用同欄目下的其它文章方法

dede文章內容頁調用同欄目下的其它文章方法 {dede:field.aid runphp='yes'} $aid = @me; $sql = "select * from dede_archives where id =".$aid.

原创 nginx 環境下 http 跳轉 https

nginx 環境下 http 跳轉https,配置文件(.conf)寫法: server { listen 80; server_name xxxxxxxxx.com www.xxxxxxxxx.com;

原创 dede欄目添加自定義字段

1、在dede_arctype表結構中,添加一個字段(如圖):     2、找到後臺模板文件 catalog_add.htm 和 catalog_edit.htm,添加新字段的輸入框。(路徑:/dede/templets)      

原创 dedecms任意文件上傳漏洞(select_soft_post.php)

文件:select_soft_post.php 路徑:/include/dialog/select_soft_post.php  原因:在獲取完整文件名時,沒有將會對服務器造成危害的文件格式過濾掉,因此需要手動添加代碼過濾 解決方法: 1

原创 獲取文件擴展名

獲取文件擴展名: <?php function getExtension($filename) { $pos = strrpos($filename,'.'); echo strtolower(substr($filename,$

原创 PHP中常見錯誤類型(待補充)

常見錯誤類型: Parse error (解析錯誤):syntax error (語法錯誤),unexpected ‘<’,expecting end file Notice (通知) :Undefined varable (未定義的變量

原创 常用其他(待補充)

echo :輸出一個或者多個字符串 var_dump :打印變量的詳細信息,可以一次打印一個或多個變量的信息 unset() : 銷燬變量,可以一次銷燬一個或多個變量,銷燬之後變量的值爲null header語句的作用 :        

原创 表單常用樣式彙總

input-placeholder獲取焦點清空 <input type="text" placeholder="請輸入" onfocus="this.placeholder=''" onblur="this.placeholder='請

原创 將電腦文件中 不同目錄圖片歸到一個目錄中(pushd)

問題:將 路徑1 中所有的圖片文件批量轉移到 路徑2 中 路徑1:     E:\bf\uploads\日期\*.jpg 路徑2:     E:\bf\wf   操作: 1、將如下代碼放在.txt文檔中 pushd "E:\bf\upl

原创 不同時間點跳轉不同網址js

不同時間點跳轉不同網址js: <script language="javascript"> var date = new Date(); var hour = date.getHours(); var url =

原创 百度熊掌號運營位設置

百度熊掌號運營位設置: 在賬號中設置或獲取: 開發信息: 用戶名:    密碼: ClientId:賬號獲取 ClientSecret:賬號獲取 服務器配置: URL:自己添加填寫網址(底部附php文件內容) Token:自行設置,加入到

原创 頁面遮罩

頁面遮罩效果,封裝爲js,插入到頁面中,達到  “看到的頁面”  和  “源代碼”   是不同的: document.write("<frameset cols=\"100%\">"); document.write(" <frame

原创 phpstudy中nginx本地多端口部署多個web站點

更改nginx.conf文件如下: server { listen 8080; server_name localhost; root "E:/phpStudy/PH

原创 阿里雲ecs Linux軟件漏洞

漏洞名稱:CVE-2017-7895 on Ubuntu 14.04 LTS (trusty) 標題: Linux kernel 多個安全限制繞過漏洞(CVE-2017-7895) CVSS分值: 9.8 CVSS: CVSS:3.0/