You are here

function simple_html_dom::save in simplehtmldom API 7

Same name and namespace in other branches
  1. 5.2 simplehtmldom/simple_html_dom.php \simple_html_dom::save()
  2. 6 simplehtmldom/simple_html_dom.php \simple_html_dom::save()

File

simplehtmldom/simple_html_dom.php, line 569

Class

simple_html_dom

Code

function save($filepath = '') {
  $ret = $this->root
    ->innertext();
  if ($filepath !== '') {
    file_put_contents($filepath, $ret);
  }
  return $ret;
}