Click to See Complete Forum and Search --> : Problem with an include_once statement.
Nevermore
05-25-2003, 05:31 AM
I am using an include function but I get this error:
Warning: main() [function.main]: stream does not support seeking in http://www.evernet.co.uk/wtmark.php on line 0.
My include function looks like this:
include_once("http://www.evernet.co.uk/wtmark.php");
and I just get that error, and nothing inside the file is processed. Can anybody help. Thanks.
koeniepoenie
05-25-2003, 05:46 AM
I think you can't use http:// in your inculde_once() function.
If this script exist on your server you can just do it like this:
include_once("mymap/wtmark.php");
but if it's not.. you can't use the script..
greetz Koen
Nevermore
05-25-2003, 05:48 AM
Thanks - I'll try it out. ONly thing is, in the link checker thread I managed to include http://www.google.com...
koeniepoenie
05-25-2003, 05:50 AM
I don't get you mean by include google.com
but: to include scripts from other servers.. you have to have password and usernames etc..
I hope you manage to make it all work :)
grtz Koen
AdamGundry
05-25-2003, 07:23 AM
As long as URL fopen wrappers (http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen) are enabled (they are by default) you can include() an external URL, on Linux. Windows requires PHP 4.3 for this to work.
Username/password are irrelevant because the code is not parsed locally, it is just called as if a user had opened the page (i.e. if the external URL includes PHP code, that PHP code will be ignored).
Adam
Nevermore
05-25-2003, 07:37 AM
I thought so - as I said, I managed to include() Google.com. I've managed to get my script working now, so thanks anyway.