PHP - Windows
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists PHP - Windows

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old December 22nd, 2005, 11:54 PM
Ken Yarbrough
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP include problem

I recently allowed one of my friends to host their site on my server, and we
realized that when you click a link, it doesn't include the content into the
main page. I'm not sure what would cause this, but the include code is the
following:

<?php
if ($page == "")
{
include("news.php");
}
else
{
include "$arp.php";
}
?>

The function is to by default, include "news.php" and then when you click a
link, it should include the new page's content into the content box on the
website. Instead, it doesn't show anything. I thought it might have been a
browser problem, but I tested it with the newest FireFox and IE.

Any help would be highly appreciated.

If anyone is confused by my description, you can simply visit the webpage at
' '
In the Navigation, under 'Rants' click 'Mission Statement' and it SHULD
load - But for me it doesn't.
=\

Regards,
Ken Yarbrough

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply With Quote
  #2  
Old December 24th, 2005, 06:32 AM
El Bekko
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP include problem

Ken Yarbrough wrote:
I recently allowed one of my friends to host their site on my server, and we
realized that when you click a link, it doesn't include the content into the
main page. I'm not sure what would cause this, but the include code is the
following:

<?php
if ($page == "")
{
include("news.php");
}
else
{
include "$arp.php";
}
?>

The function is to by default, include "news.php" and then when you click a
link, it should include the new page's content into the content box on the
website. Instead, it doesn't show anything. I thought it might have been a
browser problem, but I tested it with the newest FireFox and IE.

Any help would be highly appreciated.

If anyone is confused by my description, you can simply visit the webpage at
' '
In the Navigation, under 'Rants' click 'Mission Statement' and it SHULD
load - But for me it doesn't.
=\

Regards,
Ken Yarbrough
Try:

<?php
if ($page == "")
{
include("news.php");
}
else
{
include($arp . ".php");
}
?>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply With Quote
  #3  
Old December 24th, 2005, 08:01 AM
David Collard
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP include problem

its not supposed to be 'include "$page.php";' is it?

what is the code that sets the '$arp' variable?



Ken Yarbrough wrote:

>I recently allowed one of my friends to host their site on my server, and we
>realized that when you click a link, it doesn't include the content into the
>main page. I'm not sure what would cause this, but the include code is the
>following:
>

<?php
if ($page == "")
{
include("news.php");
}
else
{
include "$arp.php";
}
?>
>
>The function is to by default, include "news.php" and then when you click a
>link, it should include the new page's content into the content box on the
>website. Instead, it doesn't show anything. I thought it might have been a
>browser problem, but I tested it with the newest FireFox and IE.
>
>Any help would be highly appreciated.
>
>If anyone is confused by my description, you can simply visit the webpage at
>' '
>In the Navigation, under 'Rants' click 'Mission Statement' and it SHULD
>load - But for me it doesn't.
>=\
>
>Regards,
>Ken Yarbrough
>


>


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply With Quote
  #4  
Old December 24th, 2005, 10:52 AM
uros marolt
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP include problem

What if you do it like this

<?php
if ($_GET["page"] == "")
{
include("news.php");
}
else
{
include($arp . ".php");
}
?>

How do you pass your $page variable anyway?

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists PHP - Windows > PHP include problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek