Re: [PHP] is_readable() returns 1 if file is still uploading

2009-01-12 Thread ceo
You should be able to fairly quickly fopen/fread/fseek/fread and compare the opening/ending XML tags. If it's well-formed XML, it should be trivial to detect an incomplete file versus a complete one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] is_readable(http://.... text file) says not, but I canin browser

2009-01-11 Thread John Allsopp
Nathan Rixham wrote: John Allsopp wrote: Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast))

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:42, Nathan Rixham wrote: > > pedantic: really you'd want to check the http status header returned and > take the appropriate action depending on what header was returned. > > I'm sure there's a way to get the headers from a file_get_contents using one > of the stream_get

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Nathan Rixham
Daniel Brown wrote: On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: Thanks, that worked a treat except I was getting warnings on 404. I looked around for solutions to that and it appears curl might handle that better, so I'm currently working on that. Many thanks tho .. let me know if you kn

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:10, John Allsopp wrote: > > So far I'm getting a lot of *Warning*: curl_setopt(): supplied argument is > not a valid cURL handle resource in */home/myAcc/public_html/test.php* on > line *58 > * > I searched phpinfo for 'curl' and it came up nothing, so I'm just checking

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: > > Thanks, that worked a treat except I was getting warnings on 404. I looked > around for solutions to that and it appears curl might handle that better, > so I'm currently working on that. Many thanks tho .. let me know if you know > how to sto

Re: [PHP] is_readable(http://.... text file) says not, but I canin browser

2009-01-11 Thread Nathan Rixham
John Allsopp wrote: Daniel Brown wrote: On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose(

Re: [PHP] is_readable(http://.... text file) says not, but I canin browser

2009-01-11 Thread Nathan Rixham
John Allsopp wrote: Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fo

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread John Allsopp
Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r')

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread John Allsopp
Daniel Brown wrote: On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose($fh); echo

Re: [PHP] is_readable() returns 1 if file is still uploading

2009-01-10 Thread Jim Lucas
Merlin Morgenstern wrote: Hi there, I am importing data out of xml files on a linux server. Now I am running into problems if the file is currently beeing uploaded and the upload has not finished to the server. Is there a function which returns true if the file is complete and not in upload s

Re: [PHP] is_readable() returns 1 if file is still uploading

2009-01-10 Thread Robert Cummings
On Sat, 2009-01-10 at 19:22 +0100, Merlin Morgenstern wrote: > Hi there, > > I am importing data out of xml files on a linux server. Now I am running > into problems if the file is currently beeing uploaded and the upload > has not finished to the server. > Is there a function which returns true

[PHP] is_readable() returns 1 if file is still uploading

2009-01-10 Thread Merlin Morgenstern
Hi there, I am importing data out of xml files on a linux server. Now I am running into problems if the file is currently beeing uploaded and the upload has not finished to the server. Is there a function which returns true if the file is complete and not in upload status? I tried is_readable(

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2008-12-28 Thread Daniel Brown
On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: > > $myFileLast = "http://www.myDomain.com/text.txt";; > if (is_readable($myFileLast)) > { > $fh = fopen($myFileLast, 'r'); > $theDataLast = fread($fh, 200); > fclose($fh); > echo ("The dat

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2008-12-28 Thread Nathan Nobbe
On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: > Hi > > I'm sure this is simple for yous all but I'm not sure I know the answer. > > $myFileLast = "http://www.myDomain.com/text.txt";; > if (is_readable($myFileLast)) > { > $fh = fopen($myFileLast, 'r'); >

[PHP] is_readable(http://.... text file) says not, but I can in browser

2008-12-28 Thread John Allsopp
Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose($fh);

Re: [PHP] Is_readable()

2003-04-01 Thread Jason Wong
On Tuesday 01 April 2003 23:46, Liam Gibbs wrote: > > Check that whole path leading up to the file is accessible (+x) and > > readable > > > (+r) by the webserver. > > No. I'm positive. I did the whole chmod 777 * -R at the public_html > directory, and did the proper grouping and ownership in the s

Re: [PHP] Is_readable()

2003-04-01 Thread Liam Gibbs
> Check that whole path leading up to the file is accessible (+x) and readable > (+r) by the webserver. No. I'm positive. I did the whole chmod 777 * -R at the public_html directory, and did the proper grouping and ownership in the same way (with the appropriate commands). -- PHP General Mailin

Re: [PHP] Is_readable()

2003-03-31 Thread Jason Wong
On Tuesday 01 April 2003 12:28, Liam Gibbs wrote: > Is there anything I should know about is_readable? It seems to find a file > unreadable whether the permissions are 000 or 777. Check that whole path leading up to the file is accessible (+x) and readable (+r) by the webserver. -- Jason Wong -

[PHP] Is_readable()

2003-03-31 Thread Liam Gibbs
Is there anything I should know about is_readable? It seems to find a file unreadable whether the permissions are 000 or 777.