I know nothing about php, but I have seen references to something that looks very simple to do, so I wanted to try it out, but I am unable to get it to work.
My example is – i am trying to do an include in the footer of this page ([url]http://www.corumwebdesigns.com/sgonline/index.php)
in the code of my footer I have:
<div id=”footer”>
<?php include (‘includes/copyright.inc’) ?>
</div>
the copyright.inc file reads:
<html>
<body>
copyright 2006 Corum Web Designs
</body>
</html>
I uploaded the files, I am hosted on A Small Orange and it says I have php.
When I try to go to [url]http://www.corumwebdesigns.com/sgonline/index.php
I get this error:
Parse error: syntax error, unexpected T_STRING in /home/tmcorum/public_html/sgonline/index.php on line 1
Can someone spell out to me exactly what I am doing wrong? Like I said, I know nothing about php!
Thanks!
[code=php]
<?php
echo("<?xml version="1.0" encoding="UTF-8"?>");
?>
[/code]
[code=php]
<?php
// xml encoding here
echo("<?xml version="1.0" encoding="UTF-8"?>");
?>
<!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" lang="en">
<head>
<title>Southgate Online - A listing of businesses in Southgate, Michigan</title>
<link rel="stylesheet" type="text/css" href="sgonline.css" />
</head>
<body>
<div id="container">
<div id="top">
<h1>Southgate Online</h1>
</div>
<div id="leftnav">
<h3>About Southgate Online</h3>
<p>
Looking for businesses in Southgate, MI? Here you will find listings for many Southgate businesses containing address and phone number. If the business has a website, there will also be a link to their website.</p>
<p>This listing is an ongoing project! The basic info is provided free of charge! If your business info is incorrect, please contact us at <a href="mailto: [email protected]">[email protected]</a>.</p>
<p>Home Businesses:</p>
If you have a small business you run from your home, we can list you in Southgate Online. Please contact us at <a href="mailto: [email protected]">[email protected]</a> to be added.
<br />
<br />
<p>Brought to you by<br />
<a href="http://www.corumwebdesigns.com">Corum Web Designs</a>, a proud Southgate business!<br />
We specialize in small business websites. If you need a website, please contact us: <a href="mailto: [email protected]">[email protected]</a></p>
</div>
<div id="content">
<h3>Shopping</h3>
<a href="categories/shopping.html#appliance">Appliances & Electronics</a> --
<a href="categories/shopping.html#bike">Bicycles -- Mowers</a> --
<a href="categories/shopping.html#books">Books</a> --
<a href="categories/shopping.html#clothing">Clothing</a> --
<a href="categories/shopping.html#collectibles">Collectibles</a> --
<a href="categories/shopping.html#computers">Computers</a> --
<a href="categories/shopping.html#party">Convenience/Party Stores</a> --
<a href="categories/shopping.html#crafts">Crafts</a> --
<a href="categories/shopping.html#dairy">Dairy</a> --
<a href="categories/shopping.html#department">Department Stores</a> --
<a href="categories/shopping.html#discount">Discount</a> --
<a href="categories/shopping.html#pharmacies">Drug Stores / Pharmacies</a> --
<a href="categories/shopping.html#educational">Educational</a> --
<a href="categories/shopping.html#appliance">Electronics</a> --
<a href="categories/shopping.html#entertainment">Entertainment</a> --
<a href="categories/shopping.html#fire">Fire Equipment</a> --
<a href="categories/shopping.html#florists">Florists</a> --
<a href="categories/shopping.html#gifts">Gifts</a> --
<a href="categories/shopping.html#jewelry">Jewelry</a> --
<a href="categories/shopping.html#music">Music</a> --
<a href="categories/shopping.html#office">Office Supplies</a> --
<a href="categories/shopping.html#shoes">Shoes</a> --
<a href="categories/shopping.html#sports">Sports</a> --
<a href="categories/shopping.html#signs">Signs</a> --
<a href="categories/shopping.html#tobacco">Tobacco Shop</a> --
<a href="categories/shopping.html#toys">Toys</a> --
<a href="categories/shopping.html#uniforms">Uniforms</a> --
<a href="categories/shopping.html#vacuum">Vacuum Cleaners</a> --
<a href="categories/shopping.html#video">Video Rental</a>
<h3>Home Improvement & Services:</h3>
<a href="categories/homeimprovement.html#appliance">Appliance Repair</a> --
<a href="categories/homeimprovement.html#cement">Cement / Masonry</a> --
<a href="categories/homeimprovement.html#construction">Construction</a> --
<a href="categories/homeimprovement.html#doors">Doors & Windows</a> --
<a href="categories/homeimprovement.html#dry">Dry Cleaners / Laundromats</a> --
<a href="categories/homeimprovement.html#electric">Electric</a> --
<a href="categories/homeimprovement.html#floor">Flooring</a> --
<a href="categories/homeimprovement.html#furniture">Furniture</a> --
<a href="categories/homeimprovement.html#hardware">Hardware</a> --
<a href="categories/homeimprovement.html#heat">Heating & Cooling</a> --
<a href="categories/homeimprovement.html#lawnmowers">Lawnmowers</a> --
<a href="categories/homeimprovement.html#light">Lighting</a> --
<a href="categories/homeimprovement.html#lock">Lock & Key</a> --
<a href="categories/homeimprovement.html#paint">Paint</a> --
<a href="categories/homeimprovement.html#pest">Pest Control</a> --
<a href="categories/homeimprovement.html#plumbing">Plumbing</a> --
<a href="categories/homeimprovement.html#pools">Pools</a> --
<a href="categories/homeimprovement.html#repair">Repair Services - Clocks & Watches</a> --
<a href="categories/homeimprovement.html#sewing">Sewing</a> --
<a href="categories/homeimprovement.html#sprinkler">Sprinkler Systems</a> --
<a href="categories/homeimprovement.html#stained">Stained Glass</a> --
<a href="categories/homeimprovement.html#statuary">Statuary</a> --
<a href="categories/homeimprovement.html#upholstery">Upholstery & Window Treatments</a> --
<h3>Grocery / Produce:</h3>
<a href="categories/grocery.html#bakery">Bakery</a> --
<a href="categories/grocery.html#bakery">Bakery Outlet</a> --
<a href="categories/grocery.html#grocery">Grocery</a> --
<a href="categories/grocery.html#grocery">Produce</a> --
<a href="categories/grocery.html#specialty">Specialty Food Markets</a>
<h3>Financial / Banking Services / Insurance / Legal:</h3>
<a href="categories/financial.html#attorneys">Attorneys</a> --
<a href="categories/financial.html#banks">Banks</a> --
<a href="categories/financial.html#bookkeeping">Bookkeeping Services</a> --
<a href="categories/financial.html#cashadvance">Cash Advance</a> --
<a href="categories/financial.html#cpa">CPA</a> --
<a href="categories/financial.html#creditreport">Credit Reports</a> --
<a href="categories/financial.html#creditunion">Credit Unions</a> --
<a href="categories/financial.html#insurance">Insurance</a> --
<a href="categories/financial.html#loans">Loans</a> --
<a href="categories/financial.html#mortgage">Mortgage Services</a> --
<a href="categories/financial.html#tax">Tax Services</a>
<h3>Health:</h3>
<a href="">Chiropractic</a> --
<a href="">Dentists</a> --
<a href="">Doctors</a> --
<a href="">Clinic/Center</a> --
<a href="">Emergency Services</a> --
<a href="">Eye</a> --
<a href="">Eyeglasses</a> --
<a href="">Family Services</a> --
<a href="">Fitness/Health</a> --
<a href="">Foot Care</a> --
<a href="">Home Care</a> --
<a href="">Hypnosis</a> --
<a href="">Laboratory</a> --
<a href="">Medical Equipment</a> --
<a href="">Mental Health</a> --
<a href="">OBY/GYN</a> --
<a href="">Pharmacy</a> --
<a href="">Physical Therapy</a> --
<a href="">Podiatry</a> --
<a href="">Psychiatry</a> --
<a href="">Radiology</a> --
<a href="">Urgent Care</a> --
<a href="">Vitamins</a> --
<a href="">Weight Loss</a> --
<a href="">Yoga</a>
<h3>Education:</h3>
<a href="">Public & Private Schools</a> --
<a href="">Adult Education</a>
<h3>City, State & Federal Services:</h3>
<a href="http://www.southgate-mi.org/">City of Southgate Website</a> --
<a href="">Library</a>
<h3>Automotive Services:</h3>
<a href="">Car Rental</a> --
<a href="">Car Wash</a> --
<a href="">Drivers Testing</a> --
<a href="">Glass</a> --
<a href="">Hitches</a> --
<a href="">Mufflers</a> --
<a href="">Parts</a> --
<a href="">Repairs</a> --
<a href="">Services</a> --
<a href="">Tires</a> --
<a href="">Transmissions</a> --
<a href="">Dealers</a>
</div>
<div id="rightnav">
<h3>City Services:</h3>
City Hall - Main (734) 258-3010 <br />
Mayor's Office (734) 258-3022<br />
Animal Shelter (734) 246-1328<br />
City Clerk (734) 258-3015<br />
City Council(734) 258-3023<br />
Civic Center (734) 258-3065 <br />
District Court (734) 246-1360<br />
Fire (non-emergency) (734) 258-3080<br />
Fun & Fitness Center (734) 282-9622 <br />
Golf Course (734) 258-3004<br />
Library (734) 258-3002<br />
Parks & Recreation (734) 258-3035<br />
Police (non-emergency) (734) 258-3060 <br />
Senior Center (734) 258-3066<br />
<h3>Websites:</h3>
<a href="http://www.southgate-mi.org/">City of Southgate Website</a><br />
<a href="http://www.southgateschools.com/">Southgate School District</a><br />
</div>
<div id="footer">
<?php include ('includes/copyright.inc'); ?>
</div>
</div>
</body>
</html>
[/code]
Also: the file you include shouldn't have <html><body>, etc tags. it should just have the content in between the <body> and </body> tags.[/QUOTE]
0.1.9 — BETA 5.18