icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Shared Hosting » What's going on, Surpass?

Shared Hosting Questions about your shared hosting account.

Reply
 
LinkBack Thread Tools Search this Thread
Old June 3rd, 2008, 6:20 PM   #10 (permalink)
Registered User
Fresh Surpasser
 
Joined in Apr 2004
12 posts
Gave thanks: 0
Thanked 0 times
maybe safe mode has to be turned on?
chap is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 3rd, 2008, 6:42 PM   #11 (permalink)
DemonicAngel
Super #1
 
twirp's Avatar
 
Joined in Aug 2004
Lives in Wherever The World Takes Me
Hosted on Pass76
1,809 posts
Gave thanks: 25
Thanked 33 times
Quote:
Originally Posted by Sanehouse View Post
Well, PHP includes do work on my site. What DOESN'T work is this:

PHP Code:
<?php include("site/".$id.".php"); ?>
Which makes absolutely no sense because I've been using that line of code for years on my Surpass sites.
Is ID passed in or set up above?

If it's passed in though the URL (like somesite.com/page.php?id=bob) then at the top of your code you should put:
PHP Code:
<?php
$id 
$_GET['id'];
include(
'site/' $id '.php');
?>
This is because registered_globals is turned off by default and in PHP6 it will be removed completely.
__________________
You wear Vans so high school kids will think that you can skate. He wears Vans because he can skate. TwiRp wears Vans because they were on sale. Pass76 wants Vans.
twirp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 3rd, 2008, 6:45 PM   #12 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2006
72 posts
Gave thanks: 1
Thanked 3 times
What I don't understand is why it suddenly stopped working. I never used the GET thing. The pages are located in a subfolder and at the top of the page I have this:

PHP Code:
<?php if (!$id$id "home"?>
Here's one that I definitely know was working at some point: http://united-fleet.org/suikolove/index.php
__________________
Shared Hosting Patron
http://www.united-fleet.org

Last edited by Sanehouse; June 3rd, 2008 at 6:49 PM.
Sanehouse is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 3rd, 2008, 6:51 PM   #13 (permalink)
DemonicAngel
Super #1
 
twirp's Avatar
 
Joined in Aug 2004
Lives in Wherever The World Takes Me
Hosted on Pass76
1,809 posts
Gave thanks: 25
Thanked 33 times
Quote:
Originally Posted by Sanehouse View Post
What I don't understand is why it suddenly stopped working. I never used the GET thing. The pages are located in a subfolder and at the top of the page I have this:

PHP Code:
<?php if (!$id$id "home"?>
Was PHP recently updated on your server?

Maybe try:
PHP Code:
<?php if (empty(trim($id))) $id "home"?>
or
PHP Code:
<?php
$id 
= (empty(trim($_GET['id'])) ? "home" $_GET['id'];
?>
__________________
You wear Vans so high school kids will think that you can skate. He wears Vans because he can skate. TwiRp wears Vans because they were on sale. Pass76 wants Vans.
twirp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 3rd, 2008, 8:33 PM   #14 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2006
72 posts
Gave thanks: 1
Thanked 3 times
The one I posted works. The problem lies in when you click on a link on the left menu. The URL in the address bar changes to "/index.php?id=main", but the content displayed doesn't change.
__________________
Shared Hosting Patron
http://www.united-fleet.org
Sanehouse is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 3rd, 2008, 10:12 PM   #15 (permalink)
Registered User
Seasoned Poster
 
Joined in Aug 2006
72 posts
Gave thanks: 1
Thanked 3 times
Sorry for the double-post, but I found the solution (damn you, PHP5!):

Right after </head> goes:

PHP Code:
<?php $id $_GET['id']; ?>
And where you want the content to appear:

PHP Code:
<?php
            
if (!isset($id)){
                include(
"home.php");
            }
            else{
                include(
"$id.php");
            }
            
?>
__________________
Shared Hosting Patron
http://www.united-fleet.org
Sanehouse is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 4th, 2008, 12:15 PM   #16 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Hosted on Gojira
8,032 posts
Gave thanks: 48
Thanked 129 times
I'm seeing way too much of this for comfort:

PHP Code:
<?php include($exploit); ?>
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 9th, 2008, 11:42 AM   #17 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2004
7 posts
Gave thanks: 1
Thanked 0 times
Hi,

Since I've got a similar problem I thought I'd just post here rather than start a new topic. I don't really know much about php coding itself, so if you do reply please make it simple lol

Basically I've used this php code on my websites in the past, and today I wanted to use it in a new website I'm setting up. This is basically what I use:

Code:
<?php include("http://www.adaramusic.com/menu.php"); ?>
I use that so that I can 'include' the menu file on every page, but then I only have to edit the menu file when I want to make changes.

However I seem to be getting this error:

Quote:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/adara/public_html/index.php on line 29

Warning: include(http://www.adaramusic.com/menu.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/adara/public_html/index.php on line 29

Warning: include() [function.include]: Failed opening 'http://www.adaramusic.com/menu.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/adara/public_html/index.php on line 29
I really have absolutely no idea what the problem is since this is the same method I have used in the past, and it has always worked for me.

This is the website I'll be using it on: Adara :: acoustic duo

Would really appreciate help with this!
Cheers! x
saffy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 9th, 2008, 1:08 PM   #18 (permalink)
Registered User
Fresh Surpasser
 
Joined in Dec 2004
7 posts
Gave thanks: 1
Thanked 0 times
Also, just a quick note to say that I have changed my design to not use php include at the moment as I would just like to get on with completing it. But I would still like to solve this problem for future reference.
saffy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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