User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,961 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,739 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1525 | Replies: 21
Reply
Join Date: Jan 2006
Posts: 28
Reputation: Syakoban is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Syakoban Syakoban is offline Offline
Light Poster

Re: Using include in a URL???

  #11  
Sep 23rd, 2007
Almost...

Instead of the links moving around I was hoping that the original link would change to close disclaimer in the same location. That way the disclaimer can load below the link and not affect the layout of it like:

BEFORE

header
view warning
view disclaimer
footer

AFTER

header
view warning
close disclaimer
blah blah blah blah blah blah blah blah blah blah blah blah
footer

OR

header
close warning
blah blah blah blah blah blah blah blah blah blah blah blah
view disclaimer
footer

It kinda evolved after seeing your example in action... I tried to play with your code but I don't have the skills.

Thanks again, I appreciate the help!
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 550
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: Using include in a URL???

  #12  
Sep 23rd, 2007
Reply With Quote  
Join Date: May 2007
Location: Bucharest, RO
Posts: 67
Reputation: johny_d is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
johny_d's Avatar
johny_d johny_d is offline Offline
Junior Poster in Training

Re: Using include in a URL???

  #13  
Sep 24th, 2007
Here's your code:

This is 'show.php'
 
<p>header</p>
<hr />
<?php
if (isset($_GET['show']) && $_GET['show'] == 'warning') {
 echo '<p><a href="show.php">Close warning</a></p>';
 include ('warning.html');
 echo '<p><a href="show.php?show=disclaimer">view disclaimer</a></p>';
 }
elseif (isset($_GET['show']) && $_GET['show'] == 'disclaimer') {
 echo '<p><a href="show.php?show=warning">view warning</a></p>';
 echo '<p><a href="show.php">Close disclaimer</a></p>';
 include ('disclaimer.html');
 }
else {
 echo '<p><a href="show.php?show=warning">view warning</a></p>';
 echo '<p><a href="show.php?show=disclaimer">view disclaimer</a></p>';
 }
?>
<hr />
<p>footer</p>
This is 'warning.html'
 
<h1>WARNING TEXT</h1>
<p>askdh fasf asdkfhas djfhakdhf ashfkjash fdhf kajsdhfkashf asjdfhds</p>
and this is 'disclaimer.html'
 
<h1>DISCLAIMER TEXT</h1>
<p>jdshf gdhsfg dsfhg dsfgasdowe[ wfnsdfg lsdjfgjdslfjgdsjf gljdslfjgldskfjg sjfklsjdfklgj skldjsdjfg dsjfklgjdsklfgj dskljfgklsdgfkl dsjlfgkjdsf</p>

And to kkeith29, thanks for the reply; we all have our bad days; we're cool now
Reply With Quote  
Join Date: Jan 2006
Posts: 28
Reputation: Syakoban is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Syakoban Syakoban is offline Offline
Light Poster

Re: Using include in a URL???

  #14  
Sep 24th, 2007
BEAUTIFUL Guys!!! I appreciate your help very much!

I know every language has its pros and cons but I really want to learn PHP. To me it seems like it has the best of server and inline coding rolled into one. This one little script turns my project into something really cool...

I do have one area that uses SSI to get server time and affect an image. I know it's old fashioned but it works really well. I tried using this script with a .shtml extension so that the SSI can work too, but the script bombs out. Is there a way to have the two coexist on the same page in this section?

Thanks.
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 550
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: Using include in a URL???

  #15  
Sep 24th, 2007
you can do this, but you have to specially configure the server and i doubt that your hosting company will let you do this.
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 550
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: Using include in a URL???

  #16  
Sep 24th, 2007
here, i have configured my webserver so that it will work to show you. http://68.103.192.2:8080/show.shtml or if that doesn't work https://68.103.192.2/show.shtml
Last edited by kkeith29 : Sep 24th, 2007 at 5:16 pm.
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 550
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: Using include in a URL???

  #17  
Sep 24th, 2007
also i have made custom extensions as well. try http://68.103.192.2:8080/show.haha
Reply With Quote  
Join Date: Aug 2007
Posts: 128
Reputation: hacker9801 is on a distinguished road 
Rep Power: 2
Solved Threads: 13
hacker9801 hacker9801 is offline Offline
Junior Poster

Re: Using include in a URL???

  #18  
Sep 24th, 2007
From what I read, he's probably looking for something like http://www.dynamicdrive.com/dynamici...jaxcontent.htm
Reply With Quote  
Join Date: Jan 2006
Posts: 28
Reputation: Syakoban is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Syakoban Syakoban is offline Offline
Light Poster

Re: Using include in a URL???

  #19  
Sep 26th, 2007
Thanks again guys. The custom extensions are really cool - I had no idea that could be done, I thought the server software has its defaults and that's it. I'm on a shared server so I don't know what we are or are not allowed to do in this area. Is it a .htaccess file that gets configured or something else?

The SSI I would like to use is a call to a perl CGI that uses server time and outputs back to the page. It uses the statement
<!--#include virtual="cgi-bin/open_new.pl" -->
I tried changing that to
<? include("cgi-bin/open_new.pl"); ?>
but all I got was the content of the script instead of the processed result.
I get by with a little help from my friends...
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 550
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: Using include in a URL???

  #20  
Sep 26th, 2007
you have to edit the server config file (httpd.conf). and for the second question, why do you have to use perl, couldn't you just use php to get server time.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 7:07 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC