Hello.
(i found your script after asking a question on Stackoverflow today. you can see my original question from there:
stackoverflow.com/questions/19763604/fastest-way-to-load-a-part-of-a-file-via-ajax)
I want to load a part of a file that contains some DIV sections named with "id=a1" , "id=a2" ...
the code i have used is:
find('div', 1)->class = 'bar'; $ngm_str=$html->find('div[id=a1]', 0); echo $ngm_str; ?>The "PHP Simple HTML DOM Parser" is so nice and work for me.
But it just work for small files. (i've test for files under 100-500KB)
Now i want to use "PHP Simple HTML DOM Parser" for big files. (like 1MB-10MB)
i got this error:
Fatal error: Call to a member function find() on a non-object in /public_html/load.php on line 9
(line 9 is: $ngm_str=$html->find('div[id=a1]', 0);)
Please Help me to wolve this problem.
simple_html_dom.php line 65
define('MAX_FILE_SIZE', xxx);
:)
Suggestion for improvement. Change code that allows the user to set the maximum size before including simple_html_dom.php file.
With the new code, the user can set their own maximum file size allowed, if it is not set, the value will default to 600000.
The same goes for other three constants in which the user can set before including the file.
Is there any place where I can give suggestions on the direct development of the file? Improvements, tips, discuss ideas, adding smart features and functions help and stuff?
Simple_html_dom I use often, and so I decided to help a bit in development, even a little help is a fantastic class that deserves some attention of its members to improve further.
Last edit: hlcb 2014-05-28
Thanks for reporting this issue!
[247fe5] uses the solution @hlbc suggested to allow you to define the maximum file size before the parser does (see commit message for more details).
Related
Commit: [247fe5]