加入vip [簽到送金幣]
注冊 登錄 QQ登錄
織夢無憂,用心做好源碼!7年品牌,值得信賴! 織夢無憂,個個精品,寧缺毋濫!每月購買不少于3000元精品源碼免費分享,早開通,早享受!終身會員臨時大促,只需要128元!新會員開通,直接進入會員中心--購買會員--直接開通即可。

織夢發布圖片到指定遠程服務器(文章模型圖集模型)

摘要: 1、進入寶塔面板,右側,軟件管理,找到PureFTPd,設置,配置修改,搜索ForcePassiveIP,去掉它前面的#號,192.168.0.1改成你的外網IP,保存,重啟PureFTPd或者服務器 2、去系統--點擊 服務器分布/遠程設置 開啟并輸入相關配置 3、 文章模型縮略圖和文章內容

1、進入寶塔面板,右側,軟件管理,找到PureFTPd,設置,配置修改,搜索ForcePassiveIP,去掉它前面的#號,192.168.0.1改成你的外網IP,保存,重啟PureFTPd或者服務器

2、去系統--點擊服務器分布/遠程設置 開啟并輸入相關配置

3、文章模型縮略圖和文章內容圖片發布到遠程服務器

//1、打開 /dede/article_add.php 找到

//生成HTML

在它上面加入

$row1 = $dsql->GetOne("SELECT * FROM `dede_multiserv_config`");
$isftp = $row1['remoteuploads'];
$ftpurl = $row1['remoteupUrl'];
$ftpconfig = $row1['servinfo'];
$ftpconfig_arr = array();
$ftpconfig_txt = explode('|', $ftpconfig);
foreach($ftpconfig_txt as $str){
	$ftpconfig_arr[] = trim($str);
}

if($isftp == 1){		
	$config = array(
	  'hostname' => $ftpconfig_arr[1],
	  'username' => $ftpconfig_arr[3],
	  'password' => $ftpconfig_arr[4],
	  'port' => $ftpconfig_arr[2],
	  'debug' => 'TRUE'
	);
	$ftps = new FTP(); 
	$ftps->connect($config);
	$row2 = $dsql->GetOne("SELECT litpic FROM `dede_archives` WHERE id=$arcID");
	$imglist = $row2['litpic'];
	$row3 = $dsql->GetOne("SELECT body FROM `$addtable` WHERE aid=$arcID");
	preg_match_all("/<img([^>]*)s*src=('|")([^'"]+)('|")/", $row3['body'], $matches);
	$arr=array_unique($matches[3]);
	foreach($arr as $key){ 
		$imglist .= ','.$key; 
	}
	$imglistarr = array();
	$imglist_txt = explode(',', $imglist);
	foreach($imglist_txt as $str){
		$remotefile = str_replace(DEDEROOT, '', $str);
		$localfile = '..'.$remotefile;
		$remotefile2 = str_replace('uploads/', 'uploadfile/', $remotefile);
		$remotedir = preg_replace('/[^/]*.(jpg|gif|bmp|png)/', '', $remotefile2);
		$ftps->rmkdir($remotedir);
		$ftps->upload($localfile, $remotefile2);
	}
	$dsql->ExecuteNoneQuery("UPDATE `dede_archives` SET `litpic`=REPLACE(`litpic`,'/uploads','$ftpurl/uploadfile') WHERE `litpic` LIKE '%/uploads%' AND `id` = $arcID");
	$dsql->ExecuteNoneQuery("UPDATE `$addtable` SET `body`=REPLACE(`body`,'/uploads','$ftpurl/uploadfile') WHERE `body` LIKE '%/uploads%' AND `aid` = $arcID");
	$ftps->close();
}

2、打開 /dede/article_edit.php 找到

//生成HTML

在他的上面加入

$row1 = $dsql->GetOne("SELECT * FROM `dede_multiserv_config`");
$isftp = $row1['remoteuploads'];
$ftpurl = $row1['remoteupUrl'];
$ftpconfig = $row1['servinfo'];
$ftpconfig_arr = array();
$ftpconfig_txt = explode('|', $ftpconfig);
foreach($ftpconfig_txt as $str){
	$ftpconfig_arr[] = trim($str);
}

if($isftp == 1){
	$config = array(
	  'hostname' => $ftpconfig_arr[1],
	  'username' => $ftpconfig_arr[3],
	  'password' => $ftpconfig_arr[4],
	  'port' => $ftpconfig_arr[2],
	  'debug' => 'TRUE'
	);
	$ftps = new FTP(); 
	$ftps->connect($config);
	
	$row2 = $dsql->GetOne("SELECT litpic FROM `dede_archives` WHERE id=$id");
	$imglist = $row2['litpic'];
	$row3 = $dsql->GetOne("SELECT body FROM `$addtable` WHERE aid=$id");
	preg_match_all("/<img([^>]*)s*src=('|")([^'"]+)('|")/", $row3['body'], $matches);
	$arr=array_unique($matches[3]);
	foreach($arr as $key){ 
		$imglist .= ','.$key; 
	}
	$imglistarr = array();
	$imglist_txt = explode(',', $imglist);
	foreach($imglist_txt as $str){
		if(preg_match('/uploads/', $str)){
			$remotefile = str_replace(DEDEROOT, '', $str);
			$localfile = '..'.$remotefile;
			$remotefile2 = str_replace('uploads/', 'uploadfile/', $remotefile);
			$remotedir = preg_replace('/[^/]*.(jpg|gif|bmp|png)/', '', $remotefile2);
			$ftps->rmkdir($remotedir);
			$ftps->upload($localfile, $remotefile2);
		}
	}
	$dsql->ExecuteNoneQuery("UPDATE `dede_archives` SET `litpic`=REPLACE(`litpic`,'/uploads','$ftpurl/uploadfile') WHERE `litpic` LIKE '%/uploads%' AND `id` = $id");
	$dsql->ExecuteNoneQuery("UPDATE `$addtable` SET `body`=REPLACE(`body`,'/uploads','$ftpurl/uploadfile') WHERE `body` LIKE '%/uploads%' AND `aid` = $id");
	$ftps->close();
}

圖集模型縮略圖和文章內容圖片發布到遠程服務器

1、打開 /dede/album_add.php 找到

//生成HTML

在它上面加入

$row1 = $dsql->GetOne("SELECT * FROM `dede_multiserv_config`");
$isftp = $row1['remoteuploads'];
$ftpurl = $row1['remoteupUrl'];
$ftpconfig = $row1['servinfo'];
$ftpconfig_arr = array();
$ftpconfig_txt = explode('|', $ftpconfig);
foreach($ftpconfig_txt as $str){
	$ftpconfig_arr[] = trim($str);
}

if($isftp == 1){
	$config = array(
	  'hostname' => $ftpconfig_arr[1],
	  'username' => $ftpconfig_arr[3],
	  'password' => $ftpconfig_arr[4],
	  'port' => $ftpconfig_arr[2],
	  'debug' => 0
	);
	$ftps = new FTP(); 
	$ftps->connect($config);
	$row2 = $dsql->GetOne("SELECT litpic FROM `dede_archives` WHERE id=$arcID");
	$imglist = $row2['litpic'];
	$row3 = $dsql->GetOne("SELECT imgurls FROM `$addtable` WHERE aid=$arcID");
	$imgurls = $row3['imgurls'];
	if($imgurls != '')
	{
		$dtp = new DedeTagParse();
		$dtp->LoadSource($imgurls);
		$images = array();
		if(is_array($dtp->CTags))
		{
			foreach($dtp->CTags as $ctag)
			{
				if($ctag->GetName() == 'img')
				{
					$imglist .= ','.trim($ctag->GetInnerText());
				}
			}
		}
		$dtp->Clear();
	}

	$imglistarr = array();
	$imglist_txt = explode(',', $imglist);
	
	foreach($imglist_txt as $str){
		$remotefile = str_replace(DEDEROOT, '', $str);
		$localfile = '..'.$remotefile;
		$remotefile2 = str_replace('uploads/', 'uploadfile/', $remotefile);
		$remotedir = preg_replace('/[^/]*.(jpg|gif|bmp|png)/', '', $remotefile2);
		$ftps->rmkdir($remotedir);
		$ftps->upload($localfile, $remotefile2);
	}
	$dsql->ExecuteNoneQuery("UPDATE `dede_archives` SET `litpic`=REPLACE(`litpic`,'/uploads','$ftpurl/uploadfile') WHERE `litpic` LIKE '%/uploads%' AND `id` = $arcID");
	$dsql->ExecuteNoneQuery("UPDATE `$addtable` SET `imgurls`=REPLACE(`imgurls`,'/uploads','$ftpurl/uploadfile') WHERE `imgurls` LIKE '%/uploads%' AND `aid` = $arcID");
	$ftps->close();
}

 

2、打開 /dede/album_edit.php 找到

//生成HTML

在它上面加入

$row1 = $dsql->GetOne("SELECT * FROM `dede_multiserv_config`");
$isftp = $row1['remoteuploads'];
$ftpurl = $row1['remoteupUrl'];
$ftpconfig = $row1['servinfo'];
$ftpconfig_arr = array();
$ftpconfig_txt = explode('|', $ftpconfig);
foreach($ftpconfig_txt as $str){
	$ftpconfig_arr[] = trim($str);
}

if($isftp == 1){		
	$config = array(
	  'hostname' => $ftpconfig_arr[1],
	  'username' => $ftpconfig_arr[3],
	  'password' => $ftpconfig_arr[4],
	  'port' => $ftpconfig_arr[2],
	  'debug' => 0
	);
	$ftps = new FTP(); 
	$ftps->connect($config);
	
	$row2 = $dsql->GetOne("SELECT litpic FROM `dede_archives` WHERE id=$id");
	$imglist = $row2['litpic'];
	$row3 = $dsql->GetOne("SELECT imgurls FROM `$addtable` WHERE aid=$id");
	$imgurls = $row3['imgurls'];
	if($imgurls != '')
	{
		$dtp = new DedeTagParse();
		$dtp->LoadSource($imgurls);
		$images = array();
		if(is_array($dtp->CTags))
		{
			foreach($dtp->CTags as $ctag)
			{
				if($ctag->GetName() == 'img')
				{
					$imglist .= ','.trim($ctag->GetInnerText());
				}
			}
		}
		$dtp->Clear();
	}

	$imglistarr = array();
	$imglist_txt = explode(',', $imglist);
	foreach($imglist_txt as $str){
		if(preg_match('/uploads/', $str)){
			$remotefile = str_replace(DEDEROOT, '', $str);
			$localfile = '..'.$remotefile;
			$remotefile2 = str_replace('uploads/', 'uploadfile/', $remotefile);
			$remotedir = preg_replace('/[^/]*.(jpg|gif|bmp|png)/', '', $remotefile2);
			$ftps->rmkdir($remotedir);
			$ftps->upload($localfile, $remotefile2);
		}
	}
	$dsql->ExecuteNoneQuery("UPDATE `dede_archives` SET `litpic`=REPLACE(`litpic`,'/uploads','$ftpurl/uploadfile') WHERE `litpic` LIKE '%/uploads%' AND `id` = $id");
	$dsql->ExecuteNoneQuery("UPDATE `$addtable` SET `imgurls`=REPLACE(`imgurls`,'/uploads','$ftpurl/uploadfile') WHERE `imgurls` LIKE '%/uploads%' AND `aid` = $id");
	$ftps->close();
}

 

本文鏈接:http://www.acarolinfrank.com//dedecmsjiaocheng/chengxukaifa/182395.html

版權聲明:本站資源均來自互聯網或會員發布,如果侵犯了您的權益請與我們聯系,我們將在24小時內刪除!謝謝!

公眾號二維碼

微信公眾號

//自動推送 自拍偷拍排行榜P,偷拍毛片大学生,麻豆原创伙伴-蜜桃影像】[蜜桃影像 东京爱情故事2 留学生恋爱美梦,国产网红主播精品视频萌白酱,SM高跟踩踏踢打,久久艹伊人 青苹果网五月天另类小说在线播放| pr社极品尤物少女视频| 宅宅网一区二区| 免费啪视频在线观看视频| jizzdr漫画视频| Pr社露出在线| 国产网红喷水| 邪恶AV在线免费| 超碰麻豆国产在线| 精品无码av人妻受辱| 麻豆映画,自拍偷拍| 夫妻单男(bt种子)-(百度经验)-(百度网盘搜索引擎)| 新国产AV不卡| 钻石狗2017在线观看| 羞羞色院天天av| 国产日韩欧美麻豆| 波多野结衣美人妻在线观看| 桃隐在线无码av麻豆| 日韩波多野AV一卡二卡区| 有毒的通道 无码中字| 黄色网址免费观看| 国产剧情台湾主播视频在线播放| 2021最新午夜宅福利在线观看| 麻豆传媒文化,绿茶直播| 久久强奸老师看不了| 中文字幕乱5566在线视频 www.xfyy763.com www.lai915.com www.160tg.com www.| 果冻传媒妈妈的新男友| 国产网红精品一区| 国产在线高晴九九| 寂寞难耐美人妻在线观看| 意淫强奸自拍偷拍捡尸| 天美传媒新剧| 高颜值情侣自拍| 91JK在线| 99reluoli| 主播无码网红大秀| 天天干在线视频影院| 国产门群交在线视频| 韩国主播金艺贞未删版在线观看| papa午夜视频| 亚洲欧美视频步兵分区图片| http://www.mangantei.com http://www.3315198.com http://www.sa-tsuki.com http://www.anbinhmed.com http://www.pick2smart.com http://www.nereusboatyard.com国产AV剧情死亡诏书| 国产 麻豆 精| ririaiav| 91制片厂邻居人妻在线| pr社完具少女夜色| 国产AV女同性恋片| 精品麻豆音影先锋黄色电影| 美人妻白书高清版在线| 欧美人妻制服| 久久精品视频福利片| 网红主播大秀直播| 果冻传媒91CM096诈骗报复-白晶晶在线播放| 国产仑乱性爱| 久久av无码av高潮av喷吹捆绑| 亚洲AV手机在线观看不卡| 偷拍名媛久久久| 秋霞视频父传子| 超短裙ftp| 第一区二区影院| av麻豆天堂| 韩国丝袜女主播午夜福利| 尾随强奸美女主播 国产AV| 色妮姑| 情欲起市午夜影院| pr社萌汁酱视频免费观看| 果冻传媒91CM-077出轨第三集最终复仇的淫乱3P-白晶晶黄雪纯| 亚洲日韩在线看福利| pr社在线视频萌汁| 自拍偷拍片夜晚| 医院扩肛私拍视频| 国产视频沈| 久草50p| 韩国主播啪啪视频过程视频在线观看| 麻豆尤物超碰日本| 国产女同盗摄| 姐姐用土豆帮我自慰| 真白爱梨无码AV免费| pr社tumblr福利姬| 久久精品国产美咲| 亚洲91自拍网| 微博pr社最新mp4| http://www.favoritecodes.com http://www.roundtheworldwith.com http://www.wingtatinvestmentservice.com http://www.chrisatari.net http://www.hjernekirurgiogtobakk.com http://www.anshinyasai.com