My application XMLReader reads XML file from remote location. What would be the maximum file size (in bytes) for me to start reading?
Thanks
if ($file_size > XXX)
{
exit('Wohooo that is a massive file to handle for me. Chop it up please');
}
My application XMLReader reads XML file from remote location. What would be the maximum file size (in bytes) for me to start reading?
Thanks
if ($file_size > XXX)
{
exit('Wohooo that is a massive file to handle for me. Chop it up please');
}
Why do you care about the max_file size? using something like fgets you can read it one line at a time, or something like fread you can set how much to get at a time.
Using either one of these, you can easily control how much resources your script will use if you keep the memory under control.
If you are worried about chewing off too much system resource with your script, this is a fantastic read about how to better utilize memory vs CPU cycles on your server. I normally opt for unset()
btw, seem to find that it gets better results.