Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 06-04-2005, 02:15 PM   #1 (permalink)
SN3
Contributing Member
 
SN3's Avatar
 
Join Date: 10-13-03
Location: Work, USA
Posts: 5,382
iTrader: 0 / 0%
Latest Blog:
None

SN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really nice
Send a message via AIM to SN3 Send a message via Yahoo to SN3
Include

Is it possible to use the include code in a page that is already being included? It never works for me. How else could I include a file in a file that is being included?
SN3 is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 06-04-2005, 02:27 PM   #2 (permalink)
v7n Mentor
 
DaveyBoy's Avatar
 
Join Date: 10-13-03
Location: England.
Posts: 6,183
iTrader: 0 / 0%
Latest Blog:
None

DaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest orderDaveyBoy is a web professional of the highest order
why not include two seperate files or summat and place them?
DaveyBoy is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-04-2005, 03:21 PM   #3 (permalink)
SN3
Contributing Member
 
SN3's Avatar
 
Join Date: 10-13-03
Location: Work, USA
Posts: 5,382
iTrader: 0 / 0%
Latest Blog:
None

SN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really nice
Send a message via AIM to SN3 Send a message via Yahoo to SN3
It's a template system where a php file pulls another php file as a template, but I want to include in the template php file.
SN3 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-04-2005, 07:21 PM   #4 (permalink)
Inactive
 
littleFella's Avatar
 
Join Date: 06-20-04
Location: Ontario
Posts: 3,359
iTrader: 0 / 0%
Latest Blog:
None

littleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to behold
Technically it is possile, but the problem is with the path resolution. Paths in php seems to resolve relative to the final html/php code displayed in the browser.
littleFella is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-05-2005, 09:01 AM   #5 (permalink)
SN3
Contributing Member
 
SN3's Avatar
 
Join Date: 10-13-03
Location: Work, USA
Posts: 5,382
iTrader: 0 / 0%
Latest Blog:
None

SN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really nice
Send a message via AIM to SN3 Send a message via Yahoo to SN3
So what would I need to do?
SN3 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-06-2005, 05:25 AM   #6 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
You could use absolute URLs.
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-06-2005, 12:37 PM   #7 (permalink)
SN3
Contributing Member
 
SN3's Avatar
 
Join Date: 10-13-03
Location: Work, USA
Posts: 5,382
iTrader: 0 / 0%
Latest Blog:
None

SN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really nice
Send a message via AIM to SN3 Send a message via Yahoo to SN3
How would I do that?
SN3 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-06-2005, 05:11 PM   #8 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
Instead of this:

<?php include('filename.php'); ?>

Use this:

<?php include('http://www.sitename.com/filename.php'); ?>


I think that will work.
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-08-2005, 05:23 AM   #9 (permalink)
Contributing Member
 
FGTH's Avatar
 
Join Date: 03-06-04
Location: NY, CT, CA, AZ
Posts: 552
iTrader: 0 / 0%
Latest Blog:
None

FGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to all
Quote:
Originally Posted by Jazzee
Instead of this:

<?php include('filename.php'); ?>

Use this:

<?php include('http://www.sitename.com/filename.php'); ?>


I think that will work.
I'd also check for secure URIs...

Code:
<?php if (isset($_SERVER['HTTPS'])) { // Check for secure URI. include('https://www.sitename.com/filename.php'); } else { include('http://www.sitename.com/filename.php'); } ?>
__________________
"90% of the game is half mental."
--Yogi Berra
Elizabeth Arden
FGTH is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-08-2005, 03:37 PM   #10 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
What does that do?
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2005, 11:44 AM   #11 (permalink)
Contributing Member
 
FGTH's Avatar
 
Join Date: 03-06-04
Location: NY, CT, CA, AZ
Posts: 552
iTrader: 0 / 0%
Latest Blog:
None

FGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to all
When using absolute paths for includes, always call from the correct absolute path (unsecured or secured).

The code I inserted checks if the current page is http: (unsecured) or https: (secured) and calls the include from from the correct path (either the unsecured absolute path or the secured absolute path).

Placing unsecured absolute paths into a secured page breaks the SSL on that page (if using IE, you'll see the lock with a red crack through it on the bottom right).
__________________
"90% of the game is half mental."
--Yogi Berra
Elizabeth Arden
FGTH is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2005, 11:46 AM   #12 (permalink)
SN3
Contributing Member
 
SN3's Avatar
 
Join Date: 10-13-03
Location: Work, USA
Posts: 5,382
iTrader: 0 / 0%
Latest Blog:
None

SN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really niceSN3 is just really nice
Send a message via AIM to SN3 Send a message via Yahoo to SN3
Thanks!
SN3 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSI Include vs. PHP Include devilzfan300 Coding Forum 4 12-18-2006 01:14 PM
PHP Include DOS Coding Forum 3 02-12-2005 12:40 AM
php vs. ssi include downtroden Coding Forum 3 11-29-2004 10:01 AM
What Else Should I Include seonewbee Web Design Lobby 0 07-03-2004 01:15 PM
div include? Pretend Coding Forum 15 10-21-2003 02:35 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 07:47 PM.
© Copyright 2008 V7 Inc