PHP includes, calls, etc.

Sorry for the long message but… I’m somewhat familiar with HTML but very little in PHP, even though my eCommerce program is PHP based. I’ve fiddled with some of it and looked up how to do certain things. But I’m still new at this so have a couple of questions.

My webhost is GoDaddy and after fiddling for months, in March finally got my site to where I liked it. Unfortunately, I haven’t kept it up. Anyway, I went there a couple of weeks ago and found that the PHP includes I’d had in the HTML files were no longer working. I get the error [an error occurred while processing this directive]. Called GoDaddy who says they didn’t do anything . Uh huh. Now I know I didn’t do anything since I haven’t updated the site in 4 months! So, what could have caused this problem?

I’ve had no idea how to fix it other than to change the index.html to index.php and, of course, do a minor repair on the include. Works fine and my header.php and leftsidebar.php show up again. Yay! Herein lies another problem.

My header called out to other files some of which were/are html files. But those html files, just like the index, no longer show the header and leftsidebar. This had to be fixed.

I tried changing the call in header.php from, e.g., gallery.html to gallery.php and changed the gallery.php file to include the header.php and leftsidebar.php, same as my index.php file. When called on it’s own, gallery,php shows up perfectly. But, no matter what I do, the header.php file still tries to load the html file!!! It’s driving me crazy. What have I done wrong. I’ve deleted them both, refreshed, cleared cache and uploaded them again but I still get the same error. If you click on Gallery in the header, it calls gallery.html not gallery.php!

I’m so confused. HELP! ???

Adding to this to say I’m using Dreamweaver CS4 and my website cn be found at http://mikicatdesigns.com.

I don’t know why my header is insisting on trying to load the html page instead of the php. But my header code is as follows. Lines 41 and 42 work, lines 43, 44 and 45 do not.

[php]

[/php]

Finally resolved on another forum. Thought I’d post here in case anyone has the same problems.

All I had to do was remove the following code from my header and… Voila! All better.

<script type="text/javascript" src="Pluginlab/Scripts/PLHIM.js">/* PLHIMMenu script ID:PLHIMYFUFUJC */</script>

HOWEVER, this removed the color change on mouseover that the script was accomplishing. How do I fix that one?

An easier solution to keep my javascript which nicely changes my menu colors on mouse over and included submenus, was to edit the PLHIM.js file which was still pointing to the .html files instead of the newly created .php files. All works as it should now. Got my help over at http://forums.phpfreaks.com/ not here.

Sponsor our Newsletter | Privacy Policy | Terms of Service