当前位置: 首页 > news >正文

网页设计网站作业如何做网站内容管理

网页设计网站作业,如何做网站内容管理,微站小程序,wordpress漂浮表单想写一些简化管理操作的脚本#xff0c;下面是基础脚本之一#xff0c;对于一个从来没使用过perl脚本的我来说还是有些难度的#xff0c;直接上代码。此脚本用于发送远程MySQL命令并且接收结果#xff0c;功能比较简单#xff0c;后面会渐渐完善。#!/usr/bin/perl use Get…想写一些简化管理操作的脚本下面是基础脚本之一对于一个从来没使用过perl脚本的我来说还是有些难度的直接上代码。此脚本用于发送远程MySQL命令并且接收结果功能比较简单后面会渐渐完善。#!/usr/bin/perl use Getopt::Long;use DBI; Getopt::Long::GetOptions( ‘host|hs‘ \$host, ‘user|us‘ \$user, ‘password|pws‘ \$password, ‘port|ps‘ \$port, ‘command|cs‘ \$command, ‘groupfile|fs‘ \$groupfile, ‘help‘ \$help ); #print help info my $printhq{usage : mysqlcon -h 192.168.0.33 -u root -pw ‘xiaojun‘ -p 3306 -c ‘show global status‘ or mysqlcon -g 2.txt -c ‘select user();‘cat 2.txt:192.168.0.33 root xiaojun 3306192.168.0.34 root xiaojun 3306options:-h database server *-u account name *-pw password for account *-p port for mysqld *-c command to execute *-help print help};podif(!defined($host)){ print page flag set to $page }if(defined($user)){ print user flag set to $user\n ;}if(defined($password)){ print onoff flag set to $password \n;}if(defined($command)){ print help flag set to $command \n;}if(defined($help)){ print $printh}cutsub execute_sql{my $dsn DBI:mysql:databasemysql;host$_[0]:$_[1];my ($dbh,$sth,ary);$dbh DBI-connect($dsn,$_[2],$_[3],{‘RaiseError‘ 1});$sth $dbh-prepare($_[4]);$sth-execute(); while(ary $sth-fetchrow_array()){print join(\t,ary),\n;} $sth-finish; $dbh-disconnect; }#execute_sql($host,$port,$user,$password,$command) ;unless (!defined($help)) { die $printh };if(defined($groupfile)){ unless (defined($command)) { die Wrong usage : No command input .\n $printh }; open(IN,$groupfile); while($line){ my argssplit /\s/,$line; print host:args[0]\ncommand:$command\n******BEGIN\n; execute_sql(args[0],args[3],args[1],args[2],$command) ; print ******END \n\n\n*****************************************************\n\n\n; }}else{unless (defined($host)) { die Wrong usage : No host input .\n $printh };unless (defined($user)) { die Wrong usage : No account input .\n $printh };unless (defined($password)) { die Wrong usage : No password input .\n $printh };unless (defined($port)) { die Wrong usage : No port number input .\n $printh };unless (defined($command)) { die Wrong usage : No command input .\n $printh };execute_sql($host,$port,$user,$password,$command) ;}使用方法[rootcentos511 ~]# ./6.perl -h 192.168.0.33 -u root -pw ‘xiaojun‘ -p 3306 -c ‘select user()‘ ;root192.168.0.33[rootcentos511 ~]# ./6.perl -g 2.txt -c ‘select user()‘ host:192.168.0.33command:select user()******BEGINroot192.168.0.33******END *****************************************************host:192.168.0.33command:select user()******BEGINroot192.168.0.33******END *****************************************************[rootcentos511 ~]# cat 2.txt 192.168.0.33 root xiaojun 3306192.168.0.33 root xiaojun 3306[rootcentos511 ~]# ./6.perl -helpusage : mysqlcon -h 192.168.0.33 -u root -pw ‘xiaojun‘ -p 3306 -c ‘show global status‘ or mysqlcon -g 2.txt -c ‘select user();‘cat 2.txt:192.168.0.33 root xiaojun 3306192.168.0.34 root xiaojun 3306options:-h database server *-u account name *-pw password for account *-p port for mysqld *-c command to execute *-help print help
http://www.pierceye.com/news/997959/

相关文章:

  • 网站更改公司需要重新备案吗传媒网站
  • 海诚网站建设青岛李村网站设计公司
  • 哪个网站可以宣传做的蛋糕网站商城微信支付接口申请
  • 如何做淘客推广网站可信赖的手机网站设计
  • 西城专业网站建设公司哪家好外贸网站优化谷歌关键词排名
  • 先做网站后备案仿做网站可以整站下载器吧
  • ASP.NET实用网站开发 课后答案开发网站过程
  • 做网站需要编码吗仿站网站源码
  • 响应式网站什么意思爱南宁app下载官网最新
  • 自己做的网站怎么添加采集模块网站管理包括哪些内容
  • php做网站验证码的设计电商网站的二级怎么做
  • 广西网站建设价钱微信crm管理系统
  • 福州网站建设公司中小企业荆门市城乡建设管理局网站
  • 建设信用卡网站首页有做车身拉花的网站吗
  • 怎么做婚恋网站织梦网站推广插件
  • rtt全民互助平台网站开发自己怎样做免费网站
  • 建站模板东营建网站公司
  • 如何用vs做网站网络推广方案下拉管家微xiala11
  • 可以做彩票广告的网站吗做网站的应用
  • 龙岗网站 建设深圳信科湘潭做网站价格品牌磐石网络
  • 湖北网站排名优化安卓项目开发
  • 网站怎么引入微信支付郑州官方通报
  • 在南宁做家教兼职的网站北京通州做网站
  • 深圳网站的建设维护公司秦皇岛市建设局官网
  • 做网站 插件静态网站开发课程相关新闻
  • 网站建站 公司无锡搜索引擎营销的内容
  • 公司网站建设小知识单页网站是什么样子的
  • 大学网站建设排名深圳网站建设公司报价
  • 贵阳网站制作公司茶叶推广方案
  • 自适应 网站开发wordpress域名邮箱设置