I am parsing the source code of a web page like this:
private function readPage() {
header("Content-type: text/plain");
$this->pageSource = @readfile ($this->page);
}
But it seems as if I can’t assign the content into the “pageSource” variable. Where it my mistake?
Thanks a lot for your help.
readfile()reads a file and outputs it to STDOUT. I think you’re probably looking forfile_get_contents().