php include

Status
Not open for further replies.

Fernnart

New Member
Messages
4
Reaction score
0
Points
0
i have updated my php configuration to v2, intermediate.

it says that url fopen and inlcude is enables, but when I use a test of 2 files it doesn't work at all.

-test.php-
<?php include 'http://...../1.php'; ?>

-1.php-
testing include function.



please help
 

taekwondokid42

New Member
Messages
268
Reaction score
0
Points
0
you might have your syntax wrong. when I code in the include funtion, it looks like this:

<?php include("somekindofexamplefile.php");?>
 

Fernnart

New Member
Messages
4
Reaction score
0
Points
0
the following still doesn't work, including google as a test.


<?php

include ("http://www.google.com");

?>
 

JuMp-Er

New Member
Messages
4
Reaction score
0
Points
0
But u can't include website url with include() .
Try using html <iframe> tags for external pages,or use include() only for local files,like taekwondokid42 said.
 

pterodactyl

New Member
Messages
5
Reaction score
0
Points
0
To include external URLs you need "URL fopen wrappers" are enabled. Perhaps they are disabled in your current PHP version. Check latest changing in PHP version - probably you should switch to v2 or v3 to solve the problem.
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Pterodactyl is correct. You need to upgrade you version of PHP to v2 (Intermediate) in order to include remote streams / URLs or use fopen() with them.

You upgraded earlier and now have version 2. I'm wondering if you are still having this issue?
 

swizz

New Member
Messages
2
Reaction score
0
Points
0
can u please post both the include file code, and the testing file code... seems to be a problem in your syntax, rather than PHP
 

Fernnart

New Member
Messages
4
Reaction score
0
Points
0
You upgraded earlier and now have version 2. I'm wondering if you are still having this issue?

yes.... sadly i am. maybe it's because i was tweaking with my site while it's being upgraded.


sure, here they are:

Mywebsite include files for all it's content, one wrapper and 4 parts. each need some values passed onto it, so it needs url level include.

the following is what i use as test.

both files are under fernnart.exofire.net


perhaps downgrading and upgrading again would solve it? or a change in server?


test.php
-----------------
<?php

include("http://fernnart.exofire.net/1.php");


?>


1.php
--------

testing include function
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Post a URL where you're getting this error.
 

Fernnart

New Member
Messages
4
Reaction score
0
Points
0
it doesn't show an error,


it just doesn't include.



any url based include doesn't work, but if it's just file name include it would work
include("1.php"); --- works
include("http://fernnart.exofire.com/1.php"); --- doesn't work



fernnart.exofire.com/test.php
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Thanks for the URL, I didn't have time to search around for the files.

I found the problem and fixed it. This should be working for you now. Sorry for the delay.

If you have further issues, please reopen this thread.
 
Status
Not open for further replies.
Top