Forum Moderators: phranque
I have the following in my index.shtml file:
<?php include("front_ad/banners.php");? The same line executes on several other servers I have.
Here's what's in my .htaccess file:
AddType application/x-httpd-php .html .htm .php
AddHandler application/x-httpd-php .html .htm .php When I attempt to add ".shtml" to the mix, thing go *seriously" wrong. When added to the first line, my include executes, but none of the HTML does. When added to the second line, the page downloads instead of displaying.
I'm feeling like a total doof. What the heck am I doing wrong? I've googled until I'm blue in the face, but nowhere does any page that I've found address the issue of my page showing nothing BUT my executed php and no HTML. (My images show, and the banner my script's trying to rotate, but no HTML text.) May I have a clue please? This is *totally* anti-nueno!
Thanks mucho!
PS: The script executs flawlessly when I call it directly, in case you were gonna ask. (I would!)
Well *that* whooshed right over my head, but trying to read between the lines, I decided you must be trying to tell me that the "AddHandler" ought not be there, so I removed that line, then added ".shtml" to the previous line. My page didn't break (yay!), but my include didn't execute, either (boo). What didn't I get?
Binky
That worked! But ... I don't understand. I use that nomenclature for text files. The way I've been doing it is how I've been doing it for php scripts, and it's been working (on other servers, I mean)! (rolling eyes) This never even crossed my mind! I've been hammering away at .htaccess and php.ini, and pulling my hair out in bloody tufts, and all I had to do was a regular include?! Oh, my freakin' god! Sometimes I make things waaaaaaay too hard on myself. And all that googling! EVERY SINGLE PLACE I LOOKED suggested the EXACT way I was doing it! I sooo totally don't get it!
But it's working! Gots me little 125x125 pixel banners rotating now. Whew! This shouldn'ta been this hard! Thanks bunches, Vince! You rock! Smoochies!
Binky