LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2003, 01:05 PM   #1
Cynthia Blue
Member
 
Registered: Dec 2002
Location: SLC Utah USA
Distribution: SuSe 9.1
Posts: 102

Rep: Reputation: 15
#include file


I believe in windows, ASP and such, you can drop in a commented code like #include file="blah blah" and it will pull in another page into your page.

Is this possible in Linux? I run a Red Hat 8 box, apache, php, mysql... and I'd like to include an external .htm file from a different location into one of my web pages.

Thanks.
 
Old 03-31-2003, 02:11 PM   #2
bahamat
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 158

Rep: Reputation: 30
php use the requre() function.
 
Old 03-31-2003, 03:14 PM   #3
Cynthia Blue
Member
 
Registered: Dec 2002
Location: SLC Utah USA
Distribution: SuSe 9.1
Posts: 102

Original Poster
Rep: Reputation: 15
The file is just an .htm file... I could change it to php, but I'd rather not.
Thanks.
 
Old 03-31-2003, 03:19 PM   #4
bahamat
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 158

Rep: Reputation: 30
did you try it first? does it give you an error?

If it needs to be php there's no harm in changing it. If there's no php tags it will just return the document as-is.

You could also just use server side includes.
 
Old 03-31-2003, 03:26 PM   #5
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 57
Yes, this is done the same way, google for apache server side includes
 
Old 03-31-2003, 05:49 PM   #6
Cynthia Blue
Member
 
Registered: Dec 2002
Location: SLC Utah USA
Distribution: SuSe 9.1
Posts: 102

Original Poster
Rep: Reputation: 15
Okay did the search, got a tutorial I applied. It works good... unless I try to include a file which is on a seperate server, different machine, different URL. I include the full URL path.. or does that work differently?
Thanks
 
Old 03-31-2003, 06:33 PM   #7
bahamat
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 158

Rep: Reputation: 30
you can't include a file on another machine unless you do it with nfs or some other type of mountable remote file system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar.gz file did not include install file |Spec-ops Linux - Newbie 12 11-17-2005 08:25 AM
include a file in perl script Ateo Programming 1 04-22-2005 09:53 PM
make file to include libxml into your project alix123 Programming 3 12-10-2004 05:17 AM
FIle include problem (regarding routing table) rajesh_b Programming 3 10-18-2004 11:37 PM
where to put path to include file bonosa Linux - Newbie 1 05-25-2004 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration