I have source code :
A.
$this->eArticle["product_link"] = 'http://afamily.vn/doi-song/lop-hoc-toa-tau-day-nham-mat-ve-obama-khien-tre-thich-me-20150530074455878.chn';
print file_get_contents($this->eArticle["product_link"]);
AND
B.
print file_get_contents('http://afamily.vn/doi-song/lop-hoc-toa-tau-day-nham-mat-ve-obama-khien-tre-thich-me-20150530074455878.chn');
In A, result return NULL ( screen haven't text
)
In B, result display website http://afamily.vn/doi-song/lop-hoc-toa-tau-day-nham-mat-ve-obama-khien-tre-thich-me-20150530074455878.chn
Why ? How fix ? Thanks !
I am nt quite sure about what you did but
you can try storing it in a variable and function is file_get_contents()
and not file_get_content()
, NOTE for the "s" that you have missed
$this->eArticle["product_link"] = 'http://afamily.vn/doi-song/lop-hoc-toa-tau-day-nham-mat-ve-obama-khien-tre-thich-me-20150530074455878.chn';
$website_link = trim($this->eArticle["product_link"]);
echo file_get_contents($website_link);
Check out the Docs