Re: [PHP] fopen wierdness

2001-04-06 Thread Christian Reiniger
On Friday 06 April 2001 03:12, you wrote: > Technically yes. > > In an HTTP session, the server returns a header "Content-length" which > lists the more or less exact size of the file being sent. Caution: The server is not required to send this header - PHP for example doesn't do it automaticall

Re: [PHP] fopen wierdness

2001-04-05 Thread Steve Werby
"Steve Werby" <[EMAIL PROTECTED]> wrote: > acutally i found my problem, what was happening was that script1 that was > on the server that file resides had that file open at the same time that > scirpt2 was trying to open via http, when i change that files name, the > permissions changed, and scrip

Re: [PHP] fopen wierdness

2001-04-05 Thread Plutarck
Technically yes. In an HTTP session, the server returns a header "Content-length" which lists the more or less exact size of the file being sent. But there isn't really an easy way of reading HTTP headers in php, yet. I really wish there were. You can use fsockopen to make your own http session

Re: [PHP] fopen wierdness

2001-04-05 Thread Jerry
acutally i found my problem, what was happening was that script1 that was on the server that file resides had that file open at the same time that scirpt2 was trying to open via http, when i change that files name, the permissions changed, and script1 was unable to open the file, and so script2 wa

Re: [PHP] fopen wierdness

2001-04-05 Thread Richard
No, you receive the handle to the file. You cannot rename the handle. http://www.latest.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); echo $contents; fclose ($fd); ?> Should do the trick.. or something.. Modify it or whatever. - Richard "Jerry" <[EMA

Re: [PHP] fopen wierdness

2001-04-05 Thread Steve Werby
"Jerry" <[EMAIL PROTECTED]> wrote: > im trying to fopen a url with something like to following : > > fopen("something.com/something.txt", r); > > this returns a "0" If you're trying to open an external file make sure you prepend the URL with 'http://'. If that's a local file and it's not finding

[PHP] fopen wierdness

2001-04-05 Thread Jerry
im trying to fopen a url with something like to following : fopen("something.com/something.txt", r); this returns a "0" now when i rename the doc to something.htm, ill get the contents? Jerry Bonner Systems Analyst / Web Development - email: [[EMAIL PROTECTED]