Closed Thread Icon

Topic awaiting preservation: Using Perl and PHP in same web page? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12682" title="Pages that link to Topic awaiting preservation: Using Perl and PHP in same web page? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Using Perl and PHP in same web page? <span class="small">(Page 1 of 1)</span>\

 
CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-06-2003 18:03

I have my main page which uses a Perl script to post new entries. The main index page *has* to be *.shtml.

What I would like to do is have the menu in a seperate file and use an "include" statement to plop it into the main index page. The problem is that for that to work, the main index page has to be called *.php. This won't work because, like I said above, the main page has to be *.shmtl.

So, is there a way to use both scripting languages or am I just making this harder on myself?

I know I have been full of questions lately, so I apologize.

Thanks in advance.

Later,

C:\


~Binary is best~

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-06-2003 18:05

OK, I just thought of something. I don't know Perl that well so I am going to try to just use a Perl "include" and see if I can pull the menu that way into the index.shtml.

Be back later. . .

Later,

C:\


~Binary is best~

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 04-06-2003 18:40

there are ways, but the one that would be easiest on the server would be to put the menu into an iframe, and have that load the php file. Or to rewrite the menu in perl. Shouldn't be that difficult.

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 04-06-2003 18:40

Hey C:\,

Rename the index.shtml to index.php and try this instead:

code:
<?php virtual('file.cgi');?>



That will probably work better for you.

~Charlie

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 04-06-2003 19:09

How about SSI?

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 04-06-2003 21:44

Why does the main index page have to be a .shtml page?

-Butcher-

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 04-06-2003 21:56

CPrompt: Butcher has a valid point.

Even if it has to be index.shtml you could use your htaccess file to parse the page as PHP.

___________________
Emps

FAQs: Emperor

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 04-06-2003 22:24
quote:
Even if it has to be index.shtml you could use your htaccess file to parse the page as PHP.



But wouldn't you be double parsing every *.shtml page? It would be parsed as a SSI then as PHP. That sounds like a lot of excess overhead to me. Maybe I'm missing something?

I would think that if the bulk of your pages are php, then use the php virtual include, otherwise stick with SSI like DL suggested.

~Charlie

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-06-2003 23:30

OK, thanks for the replies. The reason for *having* to use *.shtml is really not that clear to me. Other than that is how the Perl script that I use for the entries is set up. For the main page to include the entries, it has to be shtml. Not real sure but that is what the directions of the script tells you to do.

The bulk of my pages are actually just html pages. I was trying to just put the menu in a seperate file so I could make changes to it as needed. (including and changing links and stuff). I can do an includes in PHP easily, but for some reason it wouldn't work unless both the index and the menu were PHP and the script that I am using is in Perl.

I know this is confusing you people because I am a little confused myself as I am telling you.

I tried Piper's suggestion already and for some reason it's not working. I am going to take a look at the htaccess again to make sure that it is parseing the files.

I am sure I'll be back. I think that I just need to find another journal script but as of yet I haven't found out if I have access to a MySQL DB or not.

Thanks for the help.

Later,

C:\


~Binary is best~

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 04-07-2003 03:45

OK, never mind. I think that Piper's suggestion will work for me. When I tried it that way earlier it didn't work. Turns out that for some reason, PHP wasn't working on my machine. I am testing this first on my machine with phpDev and it just was being quirky.

Thanks for the info.

Later,

C:\


~Binary is best~

« BackwardsOnwards »

Show Forum Drop Down Menu