彩八万

  • <tr id='hO7KaA'><strong id='hO7KaA'></strong><small id='hO7KaA'></small><button id='hO7KaA'></button><li id='hO7KaA'><noscript id='hO7KaA'><big id='hO7KaA'></big><dt id='hO7KaA'></dt></noscript></li></tr><ol id='hO7KaA'><option id='hO7KaA'><table id='hO7KaA'><blockquote id='hO7KaA'><tbody id='hO7KaA'></tbody></blockquote></table></option></ol><u id='hO7KaA'></u><kbd id='hO7KaA'><kbd id='hO7KaA'></kbd></kbd>

    <code id='hO7KaA'><strong id='hO7KaA'></strong></code>

    <fieldset id='hO7KaA'></fieldset>
          <span id='hO7KaA'></span>

              <ins id='hO7KaA'></ins>
              <acronym id='hO7KaA'><em id='hO7KaA'></em><td id='hO7KaA'><div id='hO7KaA'></div></td></acronym><address id='hO7KaA'><big id='hO7KaA'><big id='hO7KaA'></big><legend id='hO7KaA'></legend></big></address>

              <i id='hO7KaA'><div id='hO7KaA'><ins id='hO7KaA'></ins></div></i>
              <i id='hO7KaA'></i>
            1. <dl id='hO7KaA'></dl>
              1. <blockquote id='hO7KaA'><q id='hO7KaA'><noscript id='hO7KaA'></noscript><dt id='hO7KaA'></dt></q></blockquote><noframes id='hO7KaA'><i id='hO7KaA'></i>
                加入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();
                }

                 

                本文链接:/g61cg2/dedecmsjiaocheng/chengxukaifa/182395.html

                版权声明:本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们♂联系,我们将在24小时内删除!谢谢!

                公众号二维码

                微信公众号

                //自动推送