Re: Serious Fopen Problems - not newbie :)

From: Date: Sat, 01 Sep 2001 06:43:43 +0000
Subject: Re: Serious Fopen Problems - not newbie :)
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-65595@lists.php.net to get a copy of this message
Depending on the version of PHP you're using, this might help: Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because of this, directories must include trailing slashes. It's from the fopen() manual page, http://www.php.net/fopen Cheers -------------------------------- - -- - - - Philip Murray - webmaster@open2view.com http://www.open2view.com - Open2View.com ------------- - -- - - > This is a snippet from my code. > > $FILE = "http://www.somehost.com"; > > $fp = fopen($FILE, "r"); > > if(!$fp){ > print("Somethings screwy"); > } > else{ > do stuff > } > > Any suggestions? > > Paul > > Speedboy wrote: > > > > I'm sure http://www.php.net exists. :) > > > > No, what my sentence meant was you're trying to do some operations on a > > mis-typed file descripter? > > > > $fp = fopen... > > fputs($fp2... > > ^- There should be no 2. > > > > Possibly something like that? > > > > > > > > with fopen(). Everytime I try to use fopen, I get some weird error > > > > > > messages. If I do > > > > > > fopen("http://www.php.net", "r") - I get this error > > > > > > message: Undefined error: > > > > > > If I try doing > > > > > > > > > > > > fopen("http://www.somehost.com/~myname/somefile.php?var=value", "r") - I > > > > > > get this message: Bad file descriptor > > > > > > > > You're trying to do operations on a file descripter that doesn't exist? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#65595) next »