- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将 HTML 上传到数据库中,该数据库对某些文件有效,但对所有文件无效。
my $fileContents;
if( $md5Con =~ m/\.php$/g ) {
my $ftp = Net::FTP->new($DB_ftpserver, Debug => 0) or die "Cannot connect to some.host.name: $@";
$ftp->login($DB_ftpuser, $DB_ftppass) or die "Cannot login ", $ftp->message;
ftp->get("/" . $root . $webpage, "c:/perlscripts/" . md5_hex($md5Con) . "-code.php") or die $ftp->message;
my $file = "c:/perlscripts/" . md5_hex($md5Con) . "-code.php";
{
local( $/ ); # undefine the record seperator
open FILE, "<", $file or die "Cannot open:$!\n";
my $fileContents = <FILE>;
#print $fileContents;
my $bodyContents;
my $headContents;
my @contentsArray = split( /<\/head>/is, $fileContents, 2);
if( scalar @contentsArray == 2 ){
$bodyContents = $dbh->quote(trim($contentsArray[1]));
$headContents = $dbh->quote(trim($contentsArray[0]) . "</head>");
$dbh->do($createBodyTable) or die " error: Couldn't create body table: " . DBI->errstr;
$dbh->do($createHeadTable) or die " error: Couldn't create header table: " . DBI->errstr;
$dbh->do("INSERT INTO $headerTable ( headData, headDataOutput ) VALUES ( $headContents, $headContents )") or die " error: Couldn't connect to database: " . DBI->errstr;
$dbh->do("INSERT INTO $bodyTable ( bodyData, bodyDataOutput ) VALUES ( $bodyContents, $bodyContents )") or die " error: Couldn't connect to database: " . DBI->errstr;
$dbh->do("INSERT INTO page_names (linkFromRoot, linkTrue, page_name, table_name, navigation, location) VALUES ( $linkFromRoot, $linkTrue, $page_name, $table_name, $navigation, $location )") or die " error: Couldn't connect to database: " . DBI->errstr;
unlink("c:/perlscripts/" . md5_hex($md5Con) . "-code.php");
}else{
print "<span class=\"red\">" . $md5Con . " cannot be used by our CMS, invalid data.</span><br />\n";
}
}
$ftp->quit;
}
谁能看出为什么会这样?
编辑
换个角度看,这是数据进入数据库的输出...前 3 个代码块运行良好,然后在第 4 个出现错误。
<span class="green">http://www.themobilemakeover.co.uk/index.php</span><br />
'<?php session_start(); ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"h
ttp://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<meta name=\"description\" content=\"The Mo
bile Makeover offers a wide range of services and treatments all from the luxuary of your own home!\" />\n<meta name=\"keywords\" content=\"Mobile Makeover, B
eauty Therapist, Beautician, Therapist, Mobile Therapist, Mansfield, Nottinghamshire\" />\n<meta name=\"language\" content=\"en\" />\n<meta name=\"author\" co
ntent=\"ACT Web Designs\" />\n<meta name=\"copyright\" content=\"The Mobile Makeover\" />\n<meta name=\"publisher\" content=\"ACT Web Designs\" />\n<meta name
=\"country\" content=\"United Kingdom\" />\n<meta name=\"city\" content=\"Mansfield, Nottinghamshire\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8
\" /> \n<meta name=\"verify-v1\" content=\"4lZIaMmjLMq+UA8nkPYB9RjF5RreNwF3Mzurm9JYvQM=\" />\n<title>The Mobile Makeover - Mobile Beautician</title>\n<link hr
ef=\"stylesheets/main.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"stylesheets/cssReset.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script
type=\"text/javascript\" src=\"js/jquery-1.3.1.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery.bgpos.js\"></script>\n<script type=\"text/java
script\" src=\"js/jquery.timers.js\"></script>\n<script type=\"text/javascript\" src=\"js/makeover.scroll.js\"></script>\n<script type=\"text/javascript\">\nv
ar gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\ndocument.write(unescape(\"%3Cscript src=\'\" + gaJsHost + \"
google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E\"));\n</script>\n<script type=\"text/javascript\">\ntry {\nvar pageTracker = _gat._getTr
acker(\"UA-8193659-6\");\npageTracker._trackPageview();\n} catch(err) {}</script></head>'
<span class="green">http://www.themobilemakeover.co.uk/about-us-the-mobile-makeover.php</span><br />
'<?php session_start(); ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"h
ttp://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<meta name=\"description\" content=\">My na
me is Kelly Knight, I am a highly Qualifed Mobile Beauty Therapist. I have trained in NVQ Level 2 and NVQ level 3 in Beauty Therapy with many additional cours
es and training...\" />\n<meta name=\"keywords\" content=\"Mobile Makeover, About Us, Beauty Therapist, Mobile Therapist, Mansfield, Nottinghamshire\" />\n<me
ta name=\"language\" content=\"en\" />\n<meta name=\"author\" content=\"ACT Web Designs\" />\n<meta name=\"copyright\" content=\"The Mobile Makeover\" />\n<me
ta name=\"publisher\" content=\"ACT Web Designs\" />\n<meta name=\"country\" content=\"United Kingdom\" />\n<meta name=\"city\" content=\"Mansfield, Nottingha
mshire\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\" /> \n<title>The Mobile Makeover - About Us</title>\n<link href=\"stylesheets/main.css\" rel
=\"stylesheet\" type=\"text/css\" />\n<link href=\"stylesheets/cssReset.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script type=\"text/javascript\" src=\"
js/jquery-1.3.1.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery.bgpos.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery.timers
.js\"></script>\n<script type=\"text/javascript\" src=\"js/makeover.scroll.js\"></script>\n<script type=\"text/javascript\">\nvar gaJsHost = ((\"https:\" == d
ocument.location.protocol) ? \"https://ssl.\" : \"http://www.\");\ndocument.write(unescape(\"%3Cscript src=\'\" + gaJsHost + \"google-analytics.com/ga.js\' ty
pe=\'text/javascript\'%3E%3C/script%3E\"));\n</script>\n<script type=\"text/javascript\">\ntry {\nvar pageTracker = _gat._getTracker(\"UA-8193659-6\");\npageT
racker._trackPageview();\n} catch(err) {}</script></head>'
<span class="green">http://www.themobilemakeover.co.uk/beauty-products-used.php</span><br />
'<?php session_start(); ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"h
ttp://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<meta name=\"description\" content=\"We use
a wide range of the finest products on the market today. Below is a short brief of just a few of the names which we believe give you the best results - we do
not compromise when it comes to quality.\" />\n<meta name=\"keywords\" content=\"Mobile Makeover, Beauty Therapist, Beauty Products, Jessica, Calgel, Eve Tay
lor, Tantrick, Therapist, Mansfield, Nottinghamshire\" />\n<meta name=\"language\" content=\"en\" />\n<meta name=\"author\" content=\"ACT Web Designs\" />\n<m
eta name=\"copyright\" content=\"The Mobile Makeover\" />\n<meta name=\"publisher\" content=\"ACT Web Designs\" />\n<meta name=\"country\" content=\"United Ki
ngdom\" />\n<meta name=\"city\" content=\"Mansfield, Nottinghamshire\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\" /> \n<title>The Mobile Makeov
er - Beauty Products Used</title>\n<link href=\"stylesheets/main.css\" rel=\"stylesheet\" type=\"text/css\" />\n<link href=\"stylesheets/cssReset.css\" rel=\"
stylesheet\" type=\"text/css\" />\n<!--[if lte IE 6]><link href=\"stylesheets/mainie6.css\" rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n<script type=
\"text/javascript\" src=\"js/jquery-1.3.1.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery.bgpos.js\"></script>\n<script type=\"text/javascrip
t\" src=\"js/jquery.timers.js\"></script>\n<script type=\"text/javascript\" src=\"js/makeover.scroll.js\"></script>\n<script type=\"text/javascript\">\nvar ga
JsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\ndocument.write(unescape(\"%3Cscript src=\'\" + gaJsHost + \"googl
e-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E\"));\n</script>\n<script type=\"text/javascript\">\ntry {\nvar pageTracker = _gat._getTracker
(\"UA-8193659-6\");\npageTracker._trackPageview();\n} catch(err) {}</script></head>'
<span class="green">http://www.themobilemakeover.co.uk/beauty-treatments.php</span><br />
'<?php session_start(); ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"h
ttp://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<meta name=\"description\" content=\"The Mo
bile Makeover offers a wide range of treatments all from the luxuary of your own home!\" />\n<meta name=\"keywords\" content=\"Mobile Makeover, Beauty Treatme
nts, Beautician, Facials, Pedicures, Hopi Ear Candles, Eye Treatments, Mansfield, Nottinghamshire\" />\n<meta name=\"language\" content=\"en\" />\n<meta name=
\"author\" content=\"ACT Web Designs\" />\n<meta name=\"copyright\" content=\"The Mobile Makeover\" />\n<meta name=\"publisher\" content=\"ACT Web Designs\" /
>\n<meta name=\"country\" content=\"United Kingdom\" />\n<meta name=\"city\" content=\"Mansfield, Nottinghamshire\" />\n<meta http-equiv=\"X-UA-Compatible\" c
ontent=\"IE=8\" /> \n<title>The Mobile Makeover - Beauty Treatments</title>\n<link href=\"stylesheets/main.css\" rel=\"stylesheet\" type=\"text/css\" />\n<lin
k href=\"stylesheets/cssReset.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script type=\"text/javascript\" src=\"js/jquery-1.3.1.js\"></script>\n<script ty
pe=\"text/javascript\" src=\"js/jquery.bgpos.js\"></script>\n<script type=\"text/javascript\" src=\"js/jquery.timers.js\"></script>\n<script type=\"text/javas
cript\" src=\"js/makeover.scroll.js\"></script>\n<script type=\"text/javascript\">\nvar gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl
.\" : \"http://www.\");\ndocument.write(unescape(\"%3Cscript src=\'\" + gaJsHost + \"google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E\"))
;\n</script>\n<script type=\"text/javascript\">\ntry {\nvar pageTracker = _gat._getTracker(\"UA-8193659-6\");\npageTracker._trackPageview();\n} catch(err) {}<
/script></head>'
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use nea
r '22e64cef7d70fa952ce7444f158e2c4e_header ( headData, headDataOutput ) VALUES ( '<' at line 1 at C:\perlscripts\cgitest.pl line 360, <FILE> chunk 4.
error: Couldn't connect to database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta
x to use near '22e64cef7d70fa952ce7444f158e2c4e_header ( headData, headDataOutput ) VALUES ( '<' at line 1 at C:\perlscripts\cgitest.pl line 360, <FILE> chunk
4.
>>>>>> 编辑 2 <<<<<<<<
使用 trace 后我不再聪明了。这是我的日志:
(现在删除“quote()”并使用占位符)
DBI 1.607-ithread default trace level set to 0x0/1 (pid 13524) at cgitest.pl line 10
-> DBI->connect(*****************************************************)
-> DBI->install_driver(mysql) for MSWin32 perl=5.010001 pid=13524 ruid=0 euid=0
install_driver: DBD::mysql version 4.011 loaded from C:/Perl/site/lib/DBD/mysql.pm
<- install_driver= DBI::dr=HASH(0x37be1fc)
!! warn: 0 CLEARED by call to connect method
<- connect('database=web110-accounts;host=79.170.44.110;', 'web110-accounts', ...)= DBI::db=HASH(0x37bdc8c) at DBI.pm line 638
<- STORE('PrintError', 1)= 1 at DBI.pm line 690
<- STORE('AutoCommit', 1)= 1 at DBI.pm line 690
<- STORE('Username', 'web110-accounts')= 1 at DBI.pm line 693
<> FETCH('Username')= 'web110-accounts' ('Username' from cache) at DBI.pm line 693
<- connected(**********************************)= undef at DBI.pm line 699
<- connect= DBI::db=HASH(0x37bdc8c)
<- STORE('dbi_connect_closure', CODE(0x37c3634))= 1 at DBI.pm line 708
<- prepare('SELECT * FROM accounts WHERE KI = '9096699576bcc810df5bc311650c4ebd' ')= DBI::st=HASH(0x37bda24) at cgitest.pl line 61
<- execute= 1 at cgitest.pl line 62
<- rows= '1' at cgitest.pl line 63
<- fetchrow_hashref= HASH(0x37bd514)24keys row1 at cgitest.pl line 64
<- finish= 1 at cgitest.pl line 71
<- disconnect= 1 at cgitest.pl line 72
****************************************************************************
****************************************************************************
<- STORE('PrintError', 1)= 1 at DBI.pm line 690
<- STORE('AutoCommit', 1)= 1 at DBI.pm line 690
<- STORE('Username', 'web110-db-2')= 1 at DBI.pm line 693
<> FETCH('Username')= 'web110-db-2' ('Username' from cache) at DBI.pm line 693
<- connected('DBI:mysql:database=web110-db-2;host=79.170.44.110;', 'web110-db-2', ...)= undef at DBI.pm line 699
<- connect= DBI::db=HASH(0x3d615ac)
<- STORE('dbi_connect_closure', CODE(0x3d60f6c))= 1 at DBI.pm line 708
<- prepare('INSERT INTO ? ( headData, headDataOutput ) VALUES ( ?, ? )')= DBI::st=HASH(0x351659c) at cgitest.pl line 263
<- prepare('INSERT INTO ? ( bodyData, bodyDataOutput ) VALUES ( ?, ? )')= DBI::st=HASH(0x37bd914) at cgitest.pl line 264
<- prepare('INSERT INTO page_names (linkFromRoot, linkTrue, page_name, table_name, navigation, location) VALUES ( ?, ?, ?, ?, ?, ? )')= DBI::st=HASH(0x3d575fc) at cgitest.pl line 265
<- quote("http://www.themobilemakeover.co.uk/index.php")= "'http://www.themobilemakeover.co.uk/index.php'" at cgitest.pl line 271
<- prepare("SELECT * FROM page_names WHERE linkTrue = 'http://www.themobilemakeover.co.uk/index.php' ")= DBI::st=HASH(0x3d571bc) at cgitest.pl line 272
<- execute= '0E0' at cgitest.pl line 273
<- rows= '0' at cgitest.pl line 274
<- quote("The Mobile Makeover - Mobile Beautician")= "'The Mobile Makeover - Mobile Beautician'" at cgitest.pl line 289
<- prepare("SELECT * FROM page_names WHERE page_name = 'The Mobile Makeover - Mobile Beautician' ")= DBI::st=HASH(0x3d56fdc) at cgitest.pl line 290
<- execute= '0E0' at cgitest.pl line 291
<- rows= '0' at cgitest.pl line 292
<- DESTROY(DBI::st=HASH(3d54254))= undef at cgitest.pl line 287
<- do('CREATE TABLE IF NOT EXISTS `6959bbd13fdb4df586a5b9d08aae1153_body` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`bodyData` TEXT NOT NULL,
`bodyDataOutput` TEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')= '0E0' at cgitest.pl line 362
<- do('CREATE TABLE IF NOT EXISTS `6959bbd13fdb4df586a5b9d08aae1153_header` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`headData` TEXT NOT NULL,
`headDataOutput` TEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')= '0E0' at cgitest.pl line 363
!! ERROR: 1064 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''6959bbd13fdb4df586a5b9d08aae1153_header' ( headData, headDataOutput ) VALUES ( ' at line 1' (err#0)
<- execute('6959bbd13fdb4df586a5b9d08aae1153_header', '<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="The Mobile Makeover offers a wide range of services and treatments all from the luxuary of your own home!" />
<meta name="keywords" content="Mobile Makeover, Beauty Therapist, Beautician, Therapist, Mobile Therapist, Mansfield, Nottinghamshire" />
<meta name="language" content="en" />
<meta name="author" content="ACT Web Designs" />
<meta name="copyright" content="The Mobile Makeover" />
<meta name="publisher" content="ACT Web Designs" />
<meta name="country" content="United Kingdom" />
<meta name="city" content="Mansfield, Nottinghamshire" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta name="verify-v1" content="4lZIaMmjLMq+UA8nkPYB9RjF5RreNwF3Mzurm9JYvQM=" />
<title>The Mobile M...', ...)= undef at cgitest.pl line 365
!! ERROR: 1064 CLEARED by call to execute method
!! ERROR: 1064 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''6959bbd13fdb4df586a5b9d08aae1153_body' ( bodyData, bodyDataOutput ) VALUES ( '<' at line 1' (err#0)
<- execute('6959bbd13fdb4df586a5b9d08aae1153_body', '<body>
<div id="wrapper">
<div id="header">
<div id="innerHeader">
<h1><span>The Mobile Makeover - Mobile Beauty Therapist - Mansfield Nottinghamshire</span></h1>
<div class="clear"></div>
<?php include("php/navigation.php"); ?>
<div class="clear"></div>
</div>
</div>
<div id="main">
<div id="content1" class="content vis">
<h2>Welcome to The Mobile Makeover</h2>
<div class="image1">
</div>
<p>Home visit appointments are designed to save you time and stress, by providing a service in the comfort of your own home, no need to worry about travel and traffic or facing the cold night air after a relaxing treatment.</p>
<p>If you have a baby or a toddler The Mobile Makeover can help you put together a package of <a href="beauty-treatments.php" title="link to treatments page">treatments</a> that is ada...', ...)= undef at cgitest.pl line 366
!! ERROR: 1064 CLEARED by call to execute method
<- execute("public_html/index.php", "http://www.themobilemakeover.co.uk/index.php", ...)= 1 at cgitest.pl line 367
<- DESTROY(DBI::st=HASH(3d56f5c))= undef at cgitest.pl line 270
<- quote("http://www.themobilemakeover.co.uk/about-us-the-mobile-makeover.php")= "'http://www.themobilemakeover.co.uk/about-us-the-mobile-makeover.php'" at cgitest.pl line 271
<- prepare("SELECT * FROM page_names WHERE linkTrue = 'http://www.themobilemakeover.co.uk/about-us-the-mobile-makeover.php' ")= DBI::st=HASH(0x3d56d9c) at cgitest.pl line 272
<- execute= '0E0' at cgitest.pl line 273
<- rows= '0' at cgitest.pl line 274
<- quote("The Mobile Makeover - About Us")= "'The Mobile Makeover - About Us'" at cgitest.pl line 289
<- prepare("SELECT * FROM page_names WHERE page_name = 'The Mobile Makeover - About Us' ")= DBI::st=HASH(0x3b07814) at cgitest.pl line 290
<- execute= '0E0' at cgitest.pl line 291
<- rows= '0' at cgitest.pl line 292
<- DESTROY(DBI::st=HASH(3d54254))= undef at cgitest.pl line 287
<- do('CREATE TABLE IF NOT EXISTS `30df18a64311aa9aaaa9576b030f0f83_body` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`bodyData` TEXT NOT NULL,
`bodyDataOutput` TEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')= '0E0' at cgitest.pl line 362
<- do('CREATE TABLE IF NOT EXISTS `30df18a64311aa9aaaa9576b030f0f83_header` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`headData` TEXT NOT NULL,
`headDataOutput` TEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')= '0E0' at cgitest.pl line 363
!! ERROR: 1064 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''30df18a64311aa9aaaa9576b030f0f83_header' ( headData, headDataOutput ) VALUES ( ' at line 1' (err#0)
<- execute('30df18a64311aa9aaaa9576b030f0f83_header', '<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content=">My name is Kelly Knight, I am a highly Qualifed Mobile Beauty Therapist. I have trained in NVQ Level 2 and NVQ level 3 in Beauty Therapy with many additional courses and training..." />
<meta name="keywords" content="Mobile Makeover, About Us, Beauty Therapist, Mobile Therapist, Mansfield, Nottinghamshire" />
<meta name="language" content="en" />
<meta name="author" content="ACT Web Designs" />
<meta name="copyright" content="The Mobile Makeover" />
<meta name="publisher" content="ACT Web Designs" />
<meta name="country" content="United Kingdom" />
<meta name="city" content="Mansfield, Nottinghamshire" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>The Mobile Makeover - About U...', ...)= undef at cgitest.pl line 365
!! ERROR: 1064 CLEARED by call to execute method
!! ERROR: 1064 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''30df18a64311aa9aaaa9576b030f0f83_body' ( bodyData, bodyDataOutput ) VALUES ( '<' at line 1' (err#0)
<- execute('30df18a64311aa9aaaa9576b030f0f83_body', '<body id="aboutUsPage">
<div id="wrapper">
<div id="header">
<div id="innerHeader">
<h1><span>The Mobile Makeover - About Us</span></h1>
<div class="clear"></div>
<?php include("php/navigation.php"); ?>
<div class="clear"></div>
</div>
</div>
<div id="main">
<div id="content1" class="content vis">
<h2>About Us - Kelly Night</h2>
<div class="image1">
</div>
<p>My name is Kelly Knight, I am a highly Qualified Mobile Beauty Therapist. I have trained in NVQ Level 2 and NVQ level 3 in Beauty Therapy with many additional courses and training gained within my time in the beauty industry. I have gained my years of experience from working at one of the UK's biggest Hotels & Spa chains where i worked as a salon supervisor. After being approached by a number of people to go mobile to their homes i recognised that the...', ...)= undef at cgitest.pl line 366
!! ERROR: 1064 CLEARED by call to execute method
<- execute("public_html/about-us-the-mobile-makeover.php", "http://www.themobilemakeover.co.uk/about-us-the-mobile-makeover.php", ...)= 1 at cgitest.pl line 367
<- DESTROY(DBI::st=HASH(3d56f1c))= undef at cgitest.pl line 270
<- quote("http://www.themobilemakeover.co.uk/beauty-products-used.php")= "'http://www.themobilemakeover.co.uk/beauty-products-used.php'" at cgitest.pl line 271
<- prepare("SELECT * FROM page_names WHERE linkTrue = 'http://www.themobilemakeover.co.uk/beauty-products-used.php' ")= DBI::st=HASH(0x3d56f3c) at cgitest.pl line 272
<- execute= '0E0' at cgitest.pl line 273
<- rows= '0' at cgitest.pl line 274
<- quote("The Mobile Makeover - Beauty Products Used")= "'The Mobile Makeover - Beauty Products Used'" at cgitest.pl line 289
<- prepare("SELECT * FROM page_names WHERE page_name = 'The Mobile Makeover - Beauty Products Used' ")= DBI::st=HASH(0x3d545a4) at cgitest.pl line 290
<- execute= '0E0' at cgitest.pl line 291
<- rows= '0' at cgitest.pl line 292
<- DESTROY(DBI::st=HASH(3d54684))= undef at cgitest.pl line 287
<- do('CREATE TABLE IF NOT EXISTS `02b5f135f611c1d7b0ec090182bc6cf5_body` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`bodyData` TEXT NOT NULL,
`bodyDataOutput` TEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')= '0E0' at cgitest.pl line 362
<- do('CREATE TABLE IF NOT EXISTS `02b5f135f611c1d7b0ec090182bc6cf5_header` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`headData` TEXT NOT NULL,
`headDataOutput` TEXT NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')= '0E0' at cgitest.pl line 363
!! ERROR: 1064 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''02b5f135f611c1d7b0ec090182bc6cf5_header' ( headData, headDataOutput ) VALUES ( ' at line 1' (err#0)
<- execute('02b5f135f611c1d7b0ec090182bc6cf5_header', '<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="We use a wide range of the finest products on the market today. Below is a short brief of just a few of the names which we believe give you the best results - we do not compromise when it comes to quality." />
<meta name="keywords" content="Mobile Makeover, Beauty Therapist, Beauty Products, Jessica, Calgel, Eve Taylor, Tantrick, Therapist, Mansfield, Nottinghamshire" />
<meta name="language" content="en" />
<meta name="author" content="ACT Web Designs" />
<meta name="copyright" content="The Mobile Makeover" />
<meta name="publisher" content="ACT Web Designs" />
<meta name="country" content="United Kingdom" />
<meta name="city" content="Mansfield, Nottinghamshire" />
<meta http-equiv="X-UA-Compa...', ...)= undef at cgitest.pl line 365
!! ERROR: 1064 CLEARED by call to execute method
!! ERROR: 1064 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''02b5f135f611c1d7b0ec090182bc6cf5_body' ( bodyData, bodyDataOutput ) VALUES ( '<' at line 1' (err#0)
<- execute('02b5f135f611c1d7b0ec090182bc6cf5_body', '<body id="aboutUsPage">
<div id="wrapper">
<div id="header">
<div id="innerHeader">
<h1><span>The Mobile Makeover - Beauty Products</span></h1>
<div class="clear"></div>
<?php include("php/navigation.php"); ?>
<div class="clear"></div>
</div>
</div>
<div id="main">
<div id="content1" class="content vis">
<h2>Beauty products that we use</h2>
<div class="image1">
</div>
<p>We use a wide range of the finest products on the market today. Below is a short brief of just a few of the names which we believe give you the best results - we do not compromise when it comes to quality.<br /> - <em>Kelly Knight</em></p>
</div>
<div class="content vis norm">
<h2>Jessica</h2>
<div class="image3">
</div>
<p>The Jessica © nail products are de...', ...)= undef at cgitest.pl line 366
!! ERROR: 1064 CLEARED by call to execute method
<- execute("public_html/beauty-products-used.php", "http://www.themobilemakeover.co.uk/beauty-products-used.php", ...)= 1 at cgitest.pl line 367
<- DESTROY(DBI::st=HASH(3d6982c))= undef at cgitest.pl line 270
<- quote("http://www.themobilemakeover.co.uk/beauty-treatments.php")= "'http://www.themobilemakeover.co.uk/beauty-treatments.php'" at cgitest.pl line 271
<- prepare("SELECT * FROM page_names WHERE linkTrue = 'http://www.themobilemakeover.co.uk/beauty-treatments.php' ")= DBI::st=HASH(0x3d56edc) at cgitest.pl line 272
<- execute= '0E0' at cgitest.pl line 273
<- rows= '0' at cgitest.pl line 274
<- quote("The Mobile Makeover - Beauty Treatments")= "'The Mobile Makeover - Beauty Treatments'" at cgitest.pl line 289
<- prepare("SELECT * FROM page_names WHERE page_name = 'The Mobile Makeover - Beauty Treatments' ")= DBI::st=HASH(0x3d6b48c) at cgitest.pl line 290
<- execute= '0E0' at cgitest.pl line 291
<- rows= '0' at cgitest.pl line 292
<- DESTROY(DBI::st=HASH(3d6c674))= undef at cgitest.pl line 287
<- do('CREATE TABLE IF NOT EXISTS `22e64cef7d70fa952ce7444f158e2c4e_body` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`bodyData` TEXT NOT NULL,
最佳答案
很难确定哪里出了问题,但我认为 Andreas Bonini 是正确的,您遇到了引用问题。
但是,他不小心将您引向了一个 PHP 函数;-)
您可以使用 DBI 的 quote method 同样的效果。 (更新:糟糕,您已经将它用于数据项。但也许您还需要将它 - 或占位符 - 用于表名变量?)
但是,大多数人认为使用 placeholder values 是更好的做法:
while (something) {
# I've imagined you're looping over the data
$dbh->do("INSERT INTO $headerTable ( headData, headDataOutput )
VALUES ( $headContents, $headContents )")
or die " error: Couldn't connect to database: " . DBI->errstr;
}
变成:
my $sth = $dbh->prepare("INSERT INTO ? ( headData, headDataOutput )
VALUES ( ?, ? )")
or die " error: Couldn't prepare : " . DBI->errstr;)
# later...
while (something) {
# loop over the data
$sth->execute($headerTable, $headContents, $headContents)
or die "couldn't execute: " . $sth->errstr;
}
未经测试...抱歉 ;-)
我不是 100% 确定您可以为表名使用占位符,但我真的不明白为什么不这样做,所以我建议尝试一下。如果不是,您应该引用()表名,如上所述。
假设您的代码在循环中运行,您可以在循环外准备一次语句处理程序 ($sth) 并多次运行 execute,如果您有很多插入要执行,这应该会节省一些时间。
HTH
关于mysql - 将 HTML 上传到数据库 - PERL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2216315/
目前我正在构建相当大的网络系统,我需要强大的 SQL 数据库解决方案。我选择 Mysql 而不是 Postgres,因为一些任务需要只读(MyISAM 引擎)而其他任务需要大量写入(InnoDB)。
我在 mysql 中使用如下命令。当它显示表格数据时,它被格式化为一个非常干净的表格,间距均匀且 |作为列分隔符。 SELECT * FROM TABLE_NAME; 当我从 CLI 运行命令时,如下
我知道这个问题之前已经被问过好几次了,我已经解决了很多问题,但到目前为止没有任何效果。 MySQL 试图将自身安装到的目录 (usr/local/mysql) 肯定有问题。关于我的错误的奇怪之处在于我
以下是我的 SQL 数据结构,我正在尝试如下两个查询: Select Wrk_ID, Wrk_LastName, Skill_Desc from Worker, Skill where
我们有一个本地 mysql 服务器(不在公共(public)域上),并希望将该服务器复制到我们拥有的 google 云 sql 实例。我的问题是:1.这可能吗?2.我们的本地服务器只能在本地网络上访问
我有一个表(test_table),其中一些字段值(例如字段 A、B 和 C)是从外部应用程序插入的,还有一个字段(字段 D),我想从现有表(store_table)插入其值,但在插入前者(A、B 和
我想创建一个 AWS RDS 实例,然后使用 terraform 管理数据库用户。因此,首先,我创建了一个 RDS 实例,然后使用创建的 RDS 实例初始化 mysql 提供程序,以进一步将其用于用户
当用户在我的网站上注册时,他们会在我的一个数据库中创建自己的表格。该表存储用户发布的所有帖子。我还想做的是也为他们生成自己的 MySql 用户——该用户仅有权从他们的表中读取、写入和删除。 创建它应该
我有一个关于 ColdFusion 和 Mysql 的问题。我有两个表:PRODUCT 和 PRODUCT_CAT。我想列出包含一些标记为:IS_EXTRANET=1 的特殊产品的类别。所以我写了这个
我想获取 recipes_id 列的值,以获取包含 ingredient_id 的 2,17 和 26 条目的值。 假设 ingredient_id 2 丢失则不获取记录。 我已经尝试过 IN 运算符
在 Ubuntu 中,我通常安装两者,但 MySQL 的客户端和服务器之间有什么区别。 作为奖励,当一个新语句提到它需要 MySQL 5.x 时,它是指客户端、服务器还是两者兼而有之。例如这个链接ht
我重新访问了我的数据库并注意到我有一些 INT 类型的主键。 这还不够独特,所以我想我会有一个指导。 我来自微软 sql 背景,在 ssms 中你可以 选择类型为“uniqeidentifier”并自
我的系统上有 MySQL,我正在尝试确定它是 Oracle MySQL 还是 MySQL。 Oracle MySQL 有区别吗: http://www.oracle.com/us/products/m
我是在生产 MySQL 中运行的应用程序的新维护者。之前的维护者已经离开,留下的文档很少,而且联系不上了。 我面临的问题是执行以下请求大约需要 10 秒: SELECT COUNT(*) FROM `
我有两个位于不同机器上的 MySQL 数据库。我想自动将数据从一台服务器传输到另一台服务器。比方说,我希望每天早上 4:00 进行数据传输。 可以吗?是否有任何 MySQL 内置功能可以让我们做到这一
有什么方法可以使用 jdbc 查询位于 mysql 根目录之外的目录中的 mysql 表,还是必须将它们移动到 mysql 根目录内的数据库文件夹中?我在 Google 上搜索时没有找到任何东西。 最
我在 mysql 数据库中有两个表。成员和 ClassNumbers。两个表都有一个付费年份字段,都有一个代码字段。我想用代码数字表中的值更新成员表中的付费年份,其中成员中的代码与 ClassNumb
情况:我有 2 台服务器,其中一台当前托管一个实时 WordPress 站点,我希望能够将该站点转移到另一台服务器,以防第一台服务器出现故障。传输源文件很容易;传输数据库是我需要弄清楚如何做的。两台服
Phpmyadmin 有一个功能是“复制数据库到”..有没有mysql查询来写这个函数?类似于将 db A 复制到新的 db B。 最佳答案 首先创建复制数据库: CREATE DATABASE du
我有一个使用 mySQL 作为后端的库存软件。我已经在我的计算机上对其进行了测试,并且运行良好。 当我在计算机上安装我的软件时,我必须执行以下步骤: 安装 mySQL 服务器 将用户名指定为“root
我是一名优秀的程序员,十分优秀!