Jump to content

Recommended Posts

Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...