最新消息:觉得本站不错的话 记得收藏哦 博客内某些功能仅供测试 讨论群:135931704 快养不起小站了 各位有闲钱就打赏下把 My Email weicots#gmail.com Please replace # with @

服务器 站群 开发 管理 同步 脚本生成器 包含 部署 更新 等 Magento 版

LINX ajiang-tuzi 5352浏览

服务器类

功能

本地 WIN CMD

本地项目复制
本地配置文件变更
本地批量 打包网站文件
本地批量 打包数据库
本地批量 压缩
本地自动 上传至远程服务器

远程 LINUX SHELL

批量 添加主机
批量 多站部署
批量 备份网站
批量 备份数据库
批量 修改配置文件
批量修改 数据库
批量替换 路径
批量 添加主机
批量 修改域名
批量 多站上传产品
远程呢缓存清理
远程刷行索引
批量 远程更新文件 或脚本

环境
XAMPP + LNMP

<?php
/**
 * WeiCot Min Framework
 * User: ajiang
 * WebSite: WWW.WEICOT.COM
 * Date: 2016/6/17 0017
 * Time: 15:37
 */

namespace Weicot\Servie;
class  ServiceManage
{
    //线上部署 的网站
    //public $upToService = array();
    //要升级的网站
    // public $upWebSite = array();
    //要删除的站
    //  public $rmName = array();
    //升级的文件名
    public $upFileName;
    //升级的文件路径
    public $upFilePath;
    //基本域名
    public $domain;
    //解压后的文件路径
    public $unZipDir;
    //时间标记
    public $timeFag;
    // shell
    public $shell;
    /*******Win CMD SHELL***********/
    //待上传目录
    public $winSavePath;
    //网站文件所在目录
    public $winFilePath;
    //命令行 所在目录
    public $winBinDir;
    /*******Linux Lnmp BASH SHELL***********/
    //win zip 文件路径
    public $WinZipFilePath;
    //网站根目录
    public $webRoot;
    //网站日志目录
    public $webLog;
    //上传存放的目录
    public $ServiceFilePath;
    /*******数据库信息*****************/
    //数据库服务器名称
    public $dbHost;
    // 连接数据库用户名
    public $dbUser;
    // 连接数据库密码
    public $dbPass;


    public function ini($ini = array())
    {
        // $this->upToService = $ini["upToService"];
        // $this->upWebSite = $ini["upWebSite"];
        //$this->rmName = $ini["rmName"];
        $this->upFileName = $ini["upFileName"];
        $this->upFilePath = $ini["upFilePath"];
        $this->domain = $ini["domain"];
        $this->winSavePath = $ini["winSavePath"];
        $this->winFilePath = $ini["winFilePath"];
        $this->winBinDir = $ini["winBinDir"];
        $this->webRoot = $ini["webRoot"];
        $this->webLog = $ini["webLog"];
        $this->WinZipFilePath = $ini["WinZipFilePath"];
        $this->ServiceFilePath = $ini["ServiceFilePath"];
        $this->dbHost = $ini["dbHost"];
        $this->dbUser = $ini["dbUser"];
        $this->dbPass = $ini["dbPass"];
        $this->unZipDir = $this->ServiceFilePath . $this->WinZipFilePath;
        $this->timeFag = date('Ymd-his', time());
    }


    //win 批量打包脚本
    public function winZipFile($upToService)
    {
        $shell = "";
        $cmdPath = "
set uppath=" . $this->winSavePath . "
set path=" . $this->winBinDir . "
";
        $shell .= $cmdPath;
        foreach ($upToService as $value) {
            $shell .= "mysqldump -u" . $this->dbUser . " -p" . $this->dbPass . " " . $value["local"] . ">%uppath%" . $value["local"] . ".sql\r\n";
            $shell .= "winrar.exe a  " . $this->winSavePath . $value["local"] . ".zip  " . $this->winFilePath . "/" . $value["local"] . "\r\n";
        }
        $scriptEnd = "
pause;
CD " . $this->winSavePath . ";
d:;
";
        $shell .= $scriptEnd;

        $this->shell = $shell;
        return $this;
    }

    //主机删除脚本
    public function  rmHost($rmName)
    {
        $rmShell = "";
        foreach ($rmName as $rmFile) {
            $webConfig = "/usr/local/nginx/conf/vhost/" . $rmFile . "." . $this->domain . ".conf";  //nginx 配置目录
            $rmShell .= "
rm -f " . $webConfig . ";
chattr -i " . $this->webRoot . $rmFile . "/.user.ini;
rm -rf  " . $this->webRoot . $rmFile . ";
rm -rf " . $this->webLog . $rmFile . ".log;
\r\n";
        }
        $this->shell = $rmShell;
        return $this;
    }
    /**
     * @param $upWebSite
     * @param string $type d f
     * @return $this
     */
    //更行文件
    public function upFile($upWebSite, $type = "f", $lev = 1)
    {
        $upShell = "";
        if ($lev == 1) {
            foreach ($upWebSite as $upValue) {

                $upShell .= '
if [ ! -' . $type . ' "' . $this->webRoot . $upValue . '/' . $this->upFilePath . '" ]; then
cp -R  ' . $this->upFileName . '  ' . $this->webRoot . $upValue . '/' . $this->upFilePath . '
else
mv  ' . $this->webRoot . $upValue . '/' . $this->upFilePath . '  ' . $this->webRoot . $upValue . '/' . $this->upFilePath . $this->timeFag . '.bk
cp -R  ' . $this->upFileName . '  ' . $this->webRoot . $upValue . '/' . $this->upFilePath . '
fi
';
            }
        } else {
            $upShell .= "unalias cp
";
            foreach ($upWebSite as $upValue) {
                $upShell .= 'cp -R  -b -S  ' . $this->timeFag . '.bk ' . $this->upFileName . '  ' . $this->webRoot . $upValue . '/' . $this->upFilePath . '
';
            }


        }


        $this->shell = $upShell;
        return $this;
    }

    //部署脚本
    public function installFile($upToService)
    {
        $installShell = "";
        foreach ($upToService as $upService) {
            $serviceName = $upService["service"];
            $fileName = $upService["local"];
            $installShell .= '
	if [ -d ' . $this->webRoot . $serviceName . ' ]
then
  echo "web dir  exist  "
else
   sh  add.sh ' . $serviceName . '
   echo "add  web  dir"
fi
'; //判断文件是否存在

            $installShell .= '
unzip -q ' . $this->ServiceFilePath . $fileName . '.zip
mv  ' . $this->unZipDir . $fileName . '/*  ' . $this->webRoot . $serviceName . '/
php changeDb.php ' . $this->webRoot . $serviceName . '/app/etc/local.xml  ' . $serviceName;//解压移动  修改
            $installShell .= "
mysql -u" . $this->dbUser . " -p" . $this->dbPass . " " . $serviceName . "<" . $fileName . ".sql
";
//导入数据库
            $installShell .= "
	cd  " . $this->webRoot . $serviceName . "/;
find . -type f -exec chmod 644 '{}' \\;
find . -type d -exec chmod 755 '{}' \\;
chmod o+w var var/.htaccess app/etc
chmod 550 lib/PEAR
chmod -R o+w media
rm -rf ./var/cache
chmod -R 777 js var media skin mai
cd " . $this->ServiceFilePath . ";
	\r\n\r\n"; //修改权限
        }
        $this->shell = $installShell;
        return $this;
    }

    //修改数据 库
    public function changeDb($upToService)
    {
        $changeDb = "";
        foreach ($upToService as $upValueChange) {
            $exeSql_1 = "UPDATE `core_config_data` SET `value` = 'http://" . $upValueChange["service"] . "." . $this->domain . "/' WHERE `core_config_data`.`path` ='web/secure/base_url'";
            $exeSql_2 = "UPDATE `core_config_data` SET `value` = 'http://" . $upValueChange["service"] . "." . $this->domain . "/' WHERE `core_config_data`.`path` ='web/unsecure/base_url'";
            $changeDb .= '$exeSql_1="' . $exeSql_1 . '";' . "\r\n";
            $changeDb .= '$exeSql_2="' . $exeSql_2 . '";' . "\r\n";
            $changeDb .= '$MYSQL=new MySql;
	$MYSQL->setDb("' . $upValueChange["service"] . '");
	$MYSQL->exe($exeSql_1);
	$MYSQL->exe($exeSql_2);' . "\r\n";
        }
        $this->php = $changeDb;
        return $this;
    }


    //输出 Shell Code

    public function toShell()
    {
        return $this->shell;
    }


    //输出 PHP Code
    public function toPhp()
    {
        return $this->php;

    }

}

使用方法

<link rel="stylesheet" type="text/css" href="./Skin/css/bootstrap.css" media="all"/>
<script type="text/javascript" src="./Skin/js/jquery.js"></script>


<?php
/**
 * WeiCot Min Framework
 * User: ajiang
 * WebSite: WWW.WEICOT.COM
 * Date: 2016/6/18 0027
 * Time: 11:20
 */
include_once('Bootstrap.php');
use Weicot\Servie\ServiceManage as Tools;

$MYSQL = new Weicot\MySql;
function ssh()
{
    $puttyPath = "D:/xmpp/htdocs/UP/ServiceTools/Dervies/PuTTY/putty.exe ";
    $value = '-ssh -pw "xxxxxxx" -m test.sh root@192.00.00.00';
    return $puttyPath . $value;
}

function getValue($value)
{
    return $_GET[$value];
}


function winExe($cmd)
{
    return exec($cmd);
}


/***
 * @param $upToService
 * @param string $regValues
 * @return string 
 */

function changeMagmiConfig($upToService, $regValue = "s1")
{
    $shell = "";
    foreach ($upToService as $webDir) {
        $shell .= '
    cd  /home/wwwroot/' . $webDir["service"] . '/mai/conf/
    sed -i "s/' . $regValue . '/' . $webDir["service"] . '/g"  magmi.ini';
    }
    return $shell;
}

function getWebPath($upToService)
{
    $upProductPath = "/mai/web/magmi.php";
    $http = "http://";
    $loaclPath = "http://127.0.0.1/up/";
    $html = '<ul class="webpath">';
    $i=1;
    foreach ($upToService as $webDir) {
        $html .= '
        <li>
                 <h4 class="collapse-title" onclick="openBlock(\'tab-info\','.$i.')">
                                    <span class="icon-add pull-right"></span>
                                   '.$webDir["service"].'
                                </h4>
        <ul id="tab-info'.$i.'" class="item">

        ';
        //$html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com" target="_Blank" >' . $webDir["service"] . '</a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com/up" target="_Blank" >' . $webDir["service"] . 'Up Product </a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com" target="_Blank" >' . $webDir["service"] . '</a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com' . $upProductPath . '" target="_Blank" >' . $webDir["service"] . 'Up Product Config </a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com/fileManage-E.php" onclick="getPath(this)" target="ManageBox" >Local Manage File</a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com/fileManage-E.php" target="_Blank" >Manage File</a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com/up/cache.php" target="ManageBox" >Clearn  Cache</a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com/up/cache.php?action=index" target="ManageBox"  >Reindex </a></li>';
        $html .= '<li><a href="' . $http . $webDir["service"] . '.weicot.com/index.php/admin/" target="_Blank" >Admin Path</a></li>';
        $html .= '<li><a href="' . $loaclPath . $webDir["local"] . '" target="_Blank" >Loca Path</a></li>';
        $html .= "</ul></li>";
        $i++;
    }
    return $html .= "</ul>";
}


function toHtml($content)
{
    echo '<textarea class="text-content"  rows="10" cols="30">' . $content . '</textarea>';

}

function getServiceInfo($info)
{
    $infoMsg = "";
    $infoMsg .= "Web Admin:" . $info["adminPass"];
    $infoMsg .= "\r\n";
    $infoMsg .= "Service Ip:" . $info["ip"];
    $infoMsg .= "\r\n";
    $infoMsg .= "Service Pass:" . $info["pass"];
    $infoMsg .= "\r\n";
    return $infoMsg;
}

function createShell($upToService)
{
    $shell = "";
    $shell = "unalias cp \r\n";
    foreach ($upToService as $webDir) {
        $shell .= 'chmod -R 777 /home/wwwroot/' . $webDir["service"] . '/*
';
        /* $shell .= "
 cd  /home/wwwroot/" . $webDir["service"] . "/app/app
 cp -R  -b -S  20161221-040751.bk  ./*  ../
 rm -rf  /home/wwwroot/" . $webDir["service"] . "/app/app
         ";
 */
    }
    return $shell;
}

function toIframe($url)
{
    return '
    <div id="iframe_path"></div>
 <iframe  class="iframe_box" frameborder="0" height="100%" width="650px" scrolling="auto"
   src="' . $url . '" name="ManageBox" id="ManageBox">
   <p>iframes are not supported by your browser.</p>
 </iframe>';
}

function toAtag($href, $namer, $tag = 1)
{
    if ($tag == 1) {
        $tagName = "_Blank";
    } else {
        $tagName = "ManageBox";
    }
    return '<div class="a_tag"><a href="' . $href . '" target="' . $tagName . '" >' . $namer . '</a></div>';
}

function toContentHtml($content)
{
    echo '<div class="pageContent">';
    echo $content;
    echo '</div>';
}

function copyWeb($orgWeb, $dir)
{
    $shell = "";
    $shell .=
        '
    if [ -d /home/wwwroot/' . $dir . ' ]
    then
  echo "web dir  exist  "
  exit
else
   sh  add.sh ' . $dir . '
   echo "add  web  dir"
fi


cp -R  /home/wwwroot/' . $orgWeb . '/*   /home/wwwroot/' . $dir . '
php changeDb.php /home/wwwroot/' . $dir . '/app/etc/local.xml  ' . $dir . '
mysqldump -uroot -proot ' . $orgWeb . '>' . $orgWeb . '.bk.sql
mysql -uroot -proot ' . $dir . '<' . $orgWeb . '.bk.sql
rm -rf ' . $orgWeb . '.bk.sql';
    $shell .= "
cd  /home/wwwroot/" . $dir . "/;
find . -type f -exec chmod 644 '{}' \\;
find . -type d -exec chmod 755 '{}' \\;
chmod o+w var var/.htaccess app/etc
chmod 550 lib/PEAR
chmod -R o+w media
rm -rf ./var/cache
chmod -R 777 js var media skin mai
cd /home/tmp/;
";
    return $shell;
}





//线上部署 的网站
$upToService = array(
    "s1" => array(
        "local" => "mct22",
        "service" => "s1",
    ),
    "s2" => array(
        "local" => "mct25",
        "service" => "s2",
    ),
    "s3" => array(
        "local" => "mct29",
        "service" => "s3",
    ),
    "s4" => array(
        "local" => "mct31",
        "service" => "s4",
    ),
    "s5" => array(
        "local" => "mct34",
        "service" => "s5",
    ),
    "s6" => array(
        "local" => "mct34",
        "service" => "s6",
    ),
    "s7" => array(
        "local" => "mct34",
        "service" => "s7",
    ),
    "s8" => array(
        "local" => "mct34",
        "service" => "s8",
    ),
    "s9" => array(
        "local" => "mct34",
        "service" => "s9",
    ),
    "s10" => array(
        "local" => "mct34",
        "service" => "s10",
    ),
    "11" => array(
        "local" => "mct34",
        "service" => "s11",
    ),

    "s12" => array(
        "local" => "mct34",
        "service" => "s12",
    ),
    "s13" => array(
        "local" => "mct22",
        "service" => "s13",
    ),
    "s14" => array(
        "local" => "mct25",
        "service" => "s14",
    ),
    "s15" => array(
        "local" => "mct29",
        "service" => "s15",
    ),
    "s16" => array(
        "local" => "mct31",
        "service" => "s16",
    ),
    "s17" => array(
        "local" => "mct34",
        "service" => "s17",
    ),
    "s18" => array(
        "local" => "mct35",
        "service" => "s18",
    ),
    "s19" => array(
        "local" => "mct36",
        "service" => "s19",
    ),
    "s20" => array(
        "local" => "mct38",
        "service" => "s20",
    ),
    "s21" => array(
        "local" => "mct40",
        "service" => "s21",
    ),
    "s22" => array(
        "local" => "mct41",
        "service" => "s22",
    ),
    "s23" => array(
        "local" => "mct41",
        "service" => "s23",
    ),
    "s24" => array(
        "local" => "mct41",
        "service" => "s24",
    ),
    "s25" => array(
        "local" => "s17",
        "service" => "s25",
    ),
    "s26" => array(
        "local" => "s18",
        "service" => "s26",
    ),
    "s27" => array(
        "local" => "s17",
        "service" => "s27",
    ),
    "s28" => array(
        "local" => "s17",
        "service" => "s28",
    ),

);


$newWebSite = array("47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58");
$info = array();
$info["adminPass"] = " xxxxxxxxxx";
$info["ip"] = " 000.000.00.000";
$info["pass"] = "000000000 ";
$info["DbMan"] = "http://s1.weicot.com/up/sap.php";
$info["LocalFileManage"] = "http://127.0.0.1/UP/ServiceTools/file/fileManage-E.php";
//要升级的网站
$upWebSite = array("s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23"); //所有网站
//$upWebSite = array("s13", "s14", "s15", "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23"); //第二批
//要删除的站
$rmName = array("25", "26");


function newWebDir($newWebSite)
{
    $shell = "";
    foreach ($newWebSite as $newWebDir) {
        $shell .= "
cd D:/xmpp/htdocs/UP
d:
mkdir mct" . $newWebDir . "
xcopy D:\\xmpp\\htdocs\\UP\\ServiceTools\\Class\\File\\baseTemplate\\dev02-color-no-cart\\*  D:\\xmpp\\htdocs\\UP\\mct" . $newWebDir . "\\   /e
set path=D:/xmpp/mysql/bin;
mysql -uroot -proot mct" . $newWebDir . "<D:/xmpp/htdocs/UP/ServiceTools/Class/File/baseTemplate/dev02.sql
start cmd && exit
http://127.0.0.1/up/mct" . $newWebDir . "/
";

    }
    return $shell;
}

$newWebPath="";
foreach ($newWebSite as $newWebDir) {
    $path="http://127.0.0.1/up/mct" . $newWebDir . "/";
    $newWebPath.=toAtag( $path, $newWebDir);

}














function newDatabases($mysql, $newDatabases)
{
    $value = "mct10";
    foreach ($newDatabases as $databaseNanme) {
        $exeSql = "create Database mct" . $databaseNanme;
        $mysql->setDb($value);
        $mysql->exe($exeSql);
    }
}


//基础配置文件
//$ini["upFileName"]= "upproduct.php"; //升级的文件名
//$ini["upFilePath"]="up/";  //升级的文件路径
$ini["domain"] = "weicot.com"; //域名
$ini["winSavePath"] = "D:/xmpp/htdocs/UP/上传测试/";   //待上传目录
$ini["winFilePath"] = "D:/xmpp/htdocs/UP";              //网站文件所在目录
$ini["winBinDir"] = "D:/xmpp/mysql/bin";                //命令行 所在目录
$ini["webRoot"] = "/home/wwwroot/";    //网站根目录
$ini["webLog"] = "/home/wwwlogs/";   //网站日志目录
$ini["WinZipFilePath"] = "xmpp/htdocs/UP/";  //解压后的目录
$ini["ServiceFilePath"] = "/home/tmp/";  //上传存放的目录  服务器
$ini["dbHost"] = "localhost";  //数据库服务器名称
$ini["dbUser"] = "root"; // 连接数据库用户名
$ini["dbPass"] = "root"; // 连接数据库密码
$ini["upFileName"] = "robots.txt"; //升级的文件名
$ini["upFilePath"] = "robots.txt";  //升级的文件路径

$stringPassMd5 = "<br />md5形式的123456密 码:e10adc3949ba59abbe56e057f20f883e";
$includePath = '
set path=D:\xmpp\mysql\bin;
set path=D:\xmpp\htdocs\UP\ServiceTools\Dervies\bin;
';

$moveShell = '
cd D:\xmpp\htdocs\UP
mkdir mct45
xcopy D:\xmpp\htdocs\UP\ServiceTools\Class\File\baseTemplate\dev02  D:\xmpp\htdocs\UP\mct45  /e
set path=D:\xmpp\mysql\bin;
mysql -uroot -proot mct45<D:\xmpp\htdocs\UP\ServiceTools\Class\File\baseTemplate\dev02.sql
http://127.0.0.1/up/mct45
';


$fileCss = file_get_contents("file/redme.txt");
$tools = new Tools;
$tools->ini($ini);
//SSH();

//echo  $tools->installFile($upToService)->toShell();   //部署
//echo  $tools->winZipFile($upToService)->toShell();    //压缩
//echo  $tools->upFile($upWebSite,"d")->toShell();           //更新 目录
//echo  $tools->rmHost($rmName)->toShell();               //删除
//echo  $tools->changeDb($upToService)->toPhp();          //更新数据库

$OrgTemplate = array(
    "template_01" => array(
        "local" => "",
        "service" => "s1",
        "description" => "小型模板"
    ),
    "template_01" => array(
        "local" => "",
        "service" => "s3",
        "description" => "小型模板 - 白色框架类模板"
    ),
    "template_01" => array(
        "local" => "",
        "service" => "s7",
        "description" => "小型模板 - 黑白"
    ),
);


//$exeSql_1 ="UPDATE `core_config_data` SET `value` = '".$webUrl."' WHERE `core_config_data`.`path` ='web/secure/base_url'";
//$exeSql_2="UPDATE `core_config_data` SET `value` = '".$webUrl."' WHERE `core_config_data`.`path` ='web/unsecure/base_url'";
//$MYSQL->setDb($value);
//$MYSQL->exe($exeSql_1);
//$MYSQL->exe($exeSql_2);
//var_dump($MYSQL);


function changeMdb($path, $value)
{
    $strXML = file_get_contents($path);
    preg_match('/<dbname.*?>(.*?)<\/dbname>/', $strXML, $matches);
    echo $matches[1];
    echo "\n";
    $xmlValue = "<dbname><![CDATA[" . $value . "]]></dbname>";
    $data = preg_replace('/<dbname.*?>(.*?)<\/dbname>/', $xmlValue, $strXML);
    file_put_contents($path, $data);
}
function setStyle()
{
    echo <<<HTML
<style>
.webpath li .item{
display:none;
}
.webpath li .open{
display:block;
}

.text-content,.webpath,.pageContent,.iframe_box{
float: left;
min-width: 30%;
min-height: 45%;
border: 1px solid black;
margin: 0;
padding: 0;
}
.webpath,{
margin: 0;
}
body {
    margin: 71px;
}

</style>

 <script>
 function getPath(value){
 document.getElementById("iframe_path").innerHTML=value.href;
//   var url=parent.document.getElementById("ManageBox").contentWindow.location.href;
   console.log(value.href);
   };
   </script>

HTML;

}

setStyle();

echo "<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">";
?>

<body>
<div class="container-fluid">

    <div class="row">

        <form action="./action.php" method="get" target="_blank"  >
            <table boeder=0 width=500>
                <th colspan=2>Win Cmd</th>
                <tr>
                    <td valign="top" align="right">命令</td>
                    <td><textarea name=CMD rows=5 cols=35 >start cmd</textarea></td>
                </tr>
                <tr>
                    <td colspan=2 align="center">
                        <input type="submit" value="提交">
                        <input type="reset" value="重置">
                    </td>
                </tr>
            </table>
        </form>


    </div>


    <div class="navbar-collapse collapse">
        <ul class="nav nav-tabs  nav-justified navbar-nav">
            <li role="presentation"><a href="#localTools">本地工具</a></li>
            <li role="presentation"><a href="#webTools">网站工具</a></li>
            <li role="presentation"><a href="#serviceTools">服务器工具</a></li>
            <li role="presentation"><a href="http://127.0.0.1/UP/ServiceTools/manageDB.php" target="_blank">本地数据库</a>
            </li>
            <li role="presentation"><a href="http://s1.weicot.com/up/sap.php" target="_blank">远程数据库</a></li>
        </ul>
    </div>

    <!-------------本地工具----------------------------->

    <div class="row" id="localTools">
        <?php


        toHtml(
            getServiceInfo($info)
            . $includePath
            . newWebDir($newWebSite)
        );

        toContentHtml(
            toAtag($info["DbMan"], "DB Manage")
            . toAtag($info["LocalFileManage"], "Local File Manage", 2)
            . $stringPassMd5
        );

        toContentHtml(
            $newWebPath."<br />
          drop database mct55;
          create database mct55;
          <br />
          D:\xmpp\htdocs\UP\mct47\
            "
        );



        ?>


    </div>


    <!-----------------网站工具------------------------------->
    <div class="row" id="webTools">
        <div class="page-sidebar">
            <?php echo getWebPath($upToService); ?>

        </div>
        <?php


        echo toIframe($info["DbMan"]);
        toHtml($fileCss);

        ?>

    </div>


    <!-----------------服务器工具------------------------------->

    <div class="row" id="serviceTools">
        <?php

        toHtml($tools->upFile($upWebSite, "f", 1)->toShell());

        toHtml(
            $tools->rmHost($rmName)->toShell()          //删除
            . "\r\n"
            . copyWeb('s17', 's27')
            . "\r\n"
            . copyWeb('s17', 's28')

        );

        toHtml($tools->installFile($upToService)->toShell());
        toHtml(createShell($upToService));
        toHtml(changeMagmiConfig($upToService, $regValue = "s1"));
        ?>
    </div>


</div>

<script>



    $jq=$;
    var fileTotal = 28;
    console.log(fileTotal);
    function openBlock(divName, divId) {
        for (i = 1; i <= fileTotal; i++) {
            console.log('Close->' + divName + i);
            $jq('#' + divName + i).attr('class', 'item');

        }
        console.log(divName + divId);
        var idFig = divName + divId;
            var open = document.getElementById(idFig);
            open.className = 'item open';

    }

</script>

</body>




<?php
// newDatabases($MYSQL, $newWebSite);  //创建新数据库


//var_dump(winExe(ssh()));?>



转载请注明:(●--●) Hello.My Weicot » 服务器 站群 开发 管理 同步 脚本生成器 包含 部署 更新 等 Magento 版

蜀ICP备15020253号-1