sub-deacon Posted January 9, 2007 Posted January 9, 2007 After at least a couple years with no changes to the script my PHP include stopped working, no errors just does't pull my menu file into my pages anymore. My site is www.stmichaelroc.org, except for the index.htm and the site map page all other pages have the include for navigation. here is is my include script <?php include('menu.php'); ?> This is a copy of the script in menu.php <script language="JavaScript"> <!-- function go(){ if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") { location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value } } //--> </script> <script language="JavaScript"> <!-- document.write('<form name="selecter"><select name="select1" size=1>'); document.write('<option value=none>Select your destination...'); document.write('<option value=none>--------------------'); document.write('<option value="index.htm">Home'); document.write('<option value="st_michael__menu.htm">Site Menu'); document.write('<option value="news.htm"> Cathedral News'); document.write('<option value="directions.htm">Directions and schedules'); document.write('<option value="events.htm">St. Michael Events'); document.write('<option value="what_is_orthodoxy.htm">What is Orthodox'); document.write('<option value="church_contacts.htm">Contact Information'); document.write('<option value="clergy.htm">Our Clergy'); document.write('<option value="hierarchs.htm">Our Hierarchs'); document.write('<option value="cultural.htm">Cultural Center'); document.write('<option value="links.htm">Web Links Page'); document.write('<option value="educational_pages.htm">Orthodox reference, and stories'); document.write('<option value="youth group.htm">Youth Pages'); document.write('</select>'); document.write('<INPUT TYPE="button" VALUE="Go" onclick="go()">'); document.write('</form>'); //--> </script> I can paste the raw javascript from the file into my pages and it works, I just can't figure out why the include will not. Also very important , even though I am pretty good at page design I am a novice at scripting especially PHP. Thank you Quote
TCH-Bruce Posted January 9, 2007 Posted January 9, 2007 Your pages are .htm files and not .php files. Did this ever work for you? You need add the following to your .htaccess file for PHP includes to work in .htm and .html documents. >AddType application/x-httpd-php .htm .html I see that you are using FrontPage. Every time you install or re-install the FrontPage extensions it modifies your .htaccess file and you will have to add this line back in to use PHP includes in those documents. Quote
sub-deacon Posted January 9, 2007 Author Posted January 9, 2007 Thank you very much that was it. I dxcon't know how that got erased from my htpaccess file. Either way that did the trick. Thank you again. Quote
TCH-Don Posted January 10, 2007 Posted January 10, 2007 I like to keep a copy of my .htaccess file on my computer as a backup and to edit. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.