当我在XAMPP中使用我的localhost服务器加载我的网站时,出现此错误: 未定义索引:第5行/Applications/XAMPP/xamppfiles/htdocs/test_new/header.php中的hideHeader
我试图理解它。它现在正在godaddy上工作并且现在正在运行。我正在更新网站,并希望测试我的更改。这是index.php
<?php
$title = "Welcome To Morabito Motors";
include "header.php";
?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<img src="images/pic.jpg" width="140" height="300" border="0" alt="" align="left">Great Prices! Great Vehicles! Great Service!<br><br>
<div class="fb-like-box" data-href="https://www.facebook.com/pages/Morabito-Motors/160508257302724" data-width="292" data-show-faces="false" data-stream="false" data-header="false"></div><div id="yelp-biz-badge-plain-1jNKR4Puw_qNR0XKLf8_Lg"><a href="http://yelp.com/biz/morabito-motors-lower-burrell" target="_blank">Check out Morabito Motors on Yelp</a></div><script>(function(d, t) {var g = d.createElement(t);var s = d.getElementsByTagName(t)[0];g.id = "yelp-biz-badge-script-plain-1jNKR4Puw_qNR0XKLf8_Lg";g.src = "//yelp.com/biz_badge_js/en_US/plain/1jNKR4Puw_qNR0XKLf8_Lg.js";s.parentNode.insertBefore(g, s);}(document, 'script'));</script><p />
<p>Jamie Morabito, owner of Morabito Motors in Lower Burrell has been in the Auto Industry since 1991. His hard work and dedication awarded him the honor of being chosen as Businessman of the year for 2003 and 2004 by the National Congressional business advisory council.<br><br>
Jamie is a member of the Strongland Chamber of Commerce as well as all the local and national car dealer associations, PIADA Pennsylvania Independent Auto Dealers Association, PADA Pennsylvania Auto Dealer Association, NIADA National Independent Auto Dealers Association, and is honored to have been elected to the BAA Dealer Advisory Board for the 2006 and 2007 terms.
<br><br>
Jamie has been recognized by our local communtities for his many contributions, involvement and sponsorships of local police departments, football, baseball, soccer, basketball and wrestling programs to name a few. Jamie Morabito believes in giving back to the communities that have always supported him and patronized his business.<br><br>
As an avid Trophy Hunter, Jamie has been recognized by many local publications for his success. Many of his trophies are on display in our indoor showroom.<br><br>
<b>Morabito Motors in Lower Burrell, PA specializes in great vehicles at great prices with outstanding customer service.</b></p>
<p>We offer automotive financing, automotive service, PA state inspections and emissions, warranties, auto detailing, tire sales and installation, on or off road accessories, vehicle locator services, remote starters, automotive electrical repairs, suspension and brake, air conditioning recharging, transmission repair, keyless entry, alarm systems, bedliners, exhaust systems. We are a complete auto dealer, Lower Burrell's exclusive automotive superstore!<br>
</p>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3030.027828089492!2d-79.71296848442876!3d40.58514115330337!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x8834bddbe1105c8f%3A0x3f644fad0f7ec35a!2s3170+Leechburg+Rd%2C+New+Kensington%2C+PA+15068!5e0!3m2!1sen!2sus!4v1452909498843" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>
<?php include "footer.php"; ?>
我是php的新手,如果这是一个愚蠢的问题,我很抱歉。
这是Header.php
<?php
include_once "sql.php";
if ($_GET['hideHeader']) {
?>
<body bgcolor=#ffffff>
<link rel="StyleSheet" type="text/css" href="/style.css">
<?php
}else {
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<Title><?=$title?> - Morabito Motors, Lower Burrell, PA - Used Car Sales, Auto Repair Shop, Car Wash</Title>
<META Name="Description" Content="Morabito Motors in Lower Burrell, PA, specializing in sport, foreign, and domestic car sales with an on-site auto repair shop, car wash, truck, jeep, and performance accessory shop." />
<META Name="Keywords" Content="used cars, auto repair, lower burrell, TRUCK CAPS, TRAILER HITCHES, OIL CHANGES, TONNEAU COVERS, BIKE RACKS, TRUCK ACCESSORIES, JEEP ACCESSORIES, CAR WASH, WHEELS, MUDFLAPS, CARMAT, TRUCK FLOOR MAT, CARGO CARRIERS, WINDOW TINT, CAR BRAKE SERVICE, BATTERY, CAR BATTERY, RADIATOR, ALTERNATOR, TUNE-UP, REMOTE START, ALARMS, BUSHWACKER, LUND, K&N, BUG SHIELD, GRILL GUARD, NERF BAR, RUNNING BOARDS, FENDER FLARE, EXTENDED AUTO WARRANTY, USED CARS, CAR ACCESSORY, NASCAR DECALS, WINDOW DECALS, HARLEY DECALS, CAR STEREO, EXHAUST, EXHAUST TIPS, STEERING WHEEL, STEERING WHEEL COVER, CAR SEAT COVER, STEP BAR, LIFT KIT, TIRE, TIRES, GROUND EFFECTS, SUSPENSION, TOOL BOX, TRUCK RACK, KEYLESS ENTRY, BED LINERS" />
<script language="javascript" src="/crossfade.js"></script>
<link rel="StyleSheet" type="text/css" href="/style.css">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15655212-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</head>
<body onload="runSlideShow()" bgcolor="#094863">
<!-- Begin Table -->
<table border="0" cellpadding="0" cellspacing="0" width="780" align="center">
<tr>
<td rowspan="1" colspan="6" width="378" height="82">
<img name="morabitoA3ea0" src="/images/morabitoA3ea_1x1.jpg" width="378" height="82" border="0" alt="" /></td>
<td rowspan="1" colspan="5" width="151" height="82">
<img name="morabitoA3ea1" src="/images/morabitoA3ea_1x2.jpg" width="151" height="82" border="0" alt="" /></td>
<td rowspan="1" colspan="4" width="251" height="82">
<img name="morabitoA3ea2" src="/images/morabitoA3ea_1x3.jpg" width="251" height="82" border="0" alt="" /></td>
</tr>
<tr>
<td rowspan="1" colspan="15" width="780" height="194">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU" height=194 width=780>
<img src="/1.jpg" name='SlideShow' style="cursor: pointer;" width=780 height=194 onClick="javascript:linkGo(this.src);"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="15">
<div class="navbar">
<a class="navlink" href="/">Home</a>
<a class="navlink" href="/showroom.php">Showroom</a>
<a class="navlink" href="/accessories.php">Accessories</a>
<a class="navlink" href="/service.php">Service Center</a>
<a class="navlink" href="/detailing.php">Detailing</a>
<a class="navlink" href="/finance.php">Finance Department</a>
<a class="navlink" href="/contact.php">Contact Us</a>
</div>
</td>
</tr>
<tr>
<td rowspan="1" colspan="15">
<div style="height: 54px; background-image: url(/images/graytitlebar.png); width: <?=isset($showSide) && !$showSize ? 780 : 500?>px; float: left;" class="title"><?=$title?></div>
<?php if (isset($showSide) && !$showSize) { } else { ?>
<div class="title" style="height: 54px; background-image: url(/images/graytitlebar2.png); float: left; width: 280px; color: #FF6; font-weight: bold;">SPECIALS!</div>
<?php } ?>
</td>
</tr>
<tr>
<td VALIGN="top" bgcolor="#FFFFFF" rowspan="1" colspan="15">
<table border=0 cellpadding=0 cellspacing=0><tr valign="top"><td width=480>
<DIV style="padding: 10px; padding-top: 0px; width: <?=isset($showSide) && !$showSize ? 760 : 480?>px;" class="bsmall">
<?php } ?>
我的问题是我在header.php的第5行缺少什么?
答案 0 :(得分:1)
变化
var promises = [];
for(var i=1;i<=pages;i++) {
promises.push(this.getPages(id,i).then(function(res){
return res.data;
}))
}
$q.all(promises).then(function(answers) {....
到
if ($_GET['hideHeader'])
在header.php中
答案 1 :(得分:0)
您可以使用if (isset($_GET['hideHeader'])) {
if ($_GET['hideHeader']) {