Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php 7.1 fix #59

Open
fox4o opened this issue Apr 19, 2018 · 1 comment
Open

php 7.1 fix #59

fox4o opened this issue Apr 19, 2018 · 1 comment

Comments

@fox4o
Copy link

fox4o commented Apr 19, 2018

//function file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
function file_get_html($url, $use_include_path = false, $context=null, $offset = 0, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
``

$offset = 0 fix problem with php 7.1

@mhosks
Copy link

mhosks commented Apr 21, 2018

Thanks for the fix. It seems to be happening with php 7.2 as well if anyone is wondering. PHP 7.0 is fine.

It was also discussed in an older thread #47

WadeHuang1993 pushed a commit to WadeHuang1993/HowIsThisBook that referenced this issue Jul 22, 2018
因為 php-simple-html-dom-parser 只支援到 PHP5.6,
若要在 PHP7 使用這個套件,必須動點手腳。
所以將這個客製化的 php-simple-html-dom-parser 納入 Src 目錄,而非 Vendor 目錄

修改 for PHP7.1 部分可參考:
sunra/php-simple-html-dom-parser#59

因應 php-simple-html-dom-parser 被納入 Src 目錄,變更 Namespace:

原本「Sunra\PhpSimple」變更為「Src\Sunra\PhpSimple」
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants