4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Include Problem
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Mar 21, 2002 1:38 am (22 years, 1 month ago) Reply with QuoteBack to Top

Right, I'm using includes, I am trying to include the file http://www.itfconline.net/dev/includes/sidebar.php

with the simple include code :

<? virtual ("includes/sidebar.php"); ?>

You would think it would work wouldn't you, surf to http://www.itfconline.net/dev/index.php, it cuts the bottom off, then surf to http://www.itfconline.net/dev/indexs.php

That is the same page, but with the code from the include pasted in rather than included, that works.

So my questions is, why the hell does it do this!!!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Garth Farley
WebHelper
WebHelper


Joined: 08 Jan 2002
Posts: 69
Location: Ireland

PostPosted: Thu Mar 21, 2002 1:53 am (22 years, 1 month ago) Reply with QuoteBack to Top

I don't see what you mean by cutting off the bottom - of the included file, yes?. It goes all the way to the last update bit for me, no bother. (IE 5)

The first (index.php) works fine, it's the (indexs.php) that's got 2 menu bars.

I'm sure you are aware of a little HTML code showing above the table for "next match".

Garth Farley
OfflineView User's ProfileFind all posts by Garth FarleySend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Mar 21, 2002 2:12 am (22 years, 1 month ago) Reply with QuoteBack to Top

Check out http://www.jsnwebservices.com/test

Exactly the same code, works correctley.

on index.php, do you get the (C) JSN Web Services red bar at the bottom?
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Mar 21, 2002 2:23 am (22 years, 1 month ago) Reply with QuoteBack to Top

I've tried it on loads of different hosts, and it works fine apart from on www.itfconline.net, obviously a problem with the server Sad
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Mar 21, 2002 2:32 am (22 years, 1 month ago) Reply with QuoteBack to Top

Actually, I was wrong, it is a bug with PHP 4.1.1, you can't include files with a :

<? virtual ("includes/sidebar.php"); ?>

Statement, you have to use :

<? include ("includes/sidebar.php"); ?>

This was ironed out in 4.1.2, and was not present in earlier versions, think that explains the situation!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Garth Farley
WebHelper
WebHelper


Joined: 08 Jan 2002
Posts: 69
Location: Ireland

PostPosted: Thu Mar 21, 2002 2:36 am (22 years, 1 month ago) Reply with QuoteBack to Top

Ahh, now I see what disappeared.

To be honest, I didn't know PHP had a virtual() function. Well you learnsomething new every day, but I'm gonna stick with include().

Sorry to be absolutely no help whatsoever.

Garth Farley
OfflineView User's ProfileFind all posts by Garth FarleySend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Mar 21, 2002 2:38 am (22 years, 1 month ago) Reply with QuoteBack to Top

strange though, you can use virtual in any other version of PHP and it works apart from in version 4.1.1, I've always used it, and this is the first time it has caused me any trouble.
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Garth Farley
WebHelper
WebHelper


Joined: 08 Jan 2002
Posts: 69
Location: Ireland

PostPosted: Thu Mar 21, 2002 2:51 am (22 years, 1 month ago) Reply with QuoteBack to Top

Maybe if you do a quick phpinfo(), your host may have disabled it for some unfathomable reason Confused

No mention of it not working in the manual page http://www.php.net/manual/en/function.virtual.php

That really is annoying.

Garth Farley
OfflineView User's ProfileFind all posts by Garth FarleySend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Mar 21, 2002 3:08 am (22 years, 1 month ago) Reply with QuoteBack to Top

No worries, I just contacted my host, and they are moving me on to their brand new servers running apache 1.3.23, PHP 4.1.2, 2.2GHZ of CPU Power etc, very happy with the service I get from my host as you can see Smile
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
szo2
Junior WebHelper
Junior WebHelper


Joined: 10 Jan 2002
Posts: 18
Location: Hong Kong

PostPosted: Thu Mar 28, 2002 4:17 am (22 years ago) Reply with QuoteBack to Top

http://www.php.net/manual/en/function.virtual.php wrote:
For PHP files, you need to use include() or require(); virtual() cannot be used to include a document which is itself a PHP file.

________________________________
Szo2
A person of no importance
OfflineView User's ProfileFind all posts by szo2Send Personal MessageSend email
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.12289 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme