fopen()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dazio
Forum Newbie
Posts: 3
Joined: Mon Mar 01, 2004 2:01 pm

fopen()

Post by dazio »

hi

i got some "small" problem.
to cut a long story short:

$name = "http://dev.progamerz.com/firmen/_overview.php";
$datei = fopen($name, "r");

--> works.

$name = "http://dev.progamerz.com/firmen/_overvi ... ter=&page=";
$datei = fopen($name, "r");

--> doesn't work. returns this message:

Warning: fopen(http://dev.progamerz.com/firmen/_overvi ... ter=&page=) [function.fopen]: failed to create stream: Invalid argument in /www/htdocs/develop/global.inc.php on line 423

... which seems to be kind of spontaneous. it worked once, i didn't change anything. maybe, php has been updated on the server, i'm not sure about that. currently, php 4.3.1 is running.
has anybody got a hint, an idea, something?

would be very nice...

thanks!
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

why do you even have 'letter=&page=' on there? If there isn't anything after the '=' then leave it off...
dazio
Forum Newbie
Posts: 3
Joined: Mon Mar 01, 2004 2:01 pm

Post by dazio »

normally letter and page have values, they are only empty in this case. i can't leave them off, as they are added automatically...
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

well, have you tried it giving them values?
dazio
Forum Newbie
Posts: 3
Joined: Mon Mar 01, 2004 2:01 pm

Post by dazio »

yes, i have, and it works.
i think the problem is that http://dev.progamerz.com/firmen/_overvi ... ter=&page= redirects to http://dev.progamerz.com/firmen/_overview.php. fopen() is obviosly not able to handle this header-redirect. but it WAS... i don't get it :cry:
at least i know where the error comes from...
Post Reply