I have this script:
<?php
require('simple_html_dom.php');
error_reporting(E_ALL);
$file = fopen("plikk.txt", "r") or die("Error");
$i=0;
$data = array();
while(!feof($file)){
$linia=fgets($file);
$html = file_get_html($linia);
$data[$i]['opis'] = $html->find(".editor-content",0)->innertext;
$data[$i]['foto'] = $html->find("img",13)->src;
}
fclose($file);
$filename = 'users.csv';
$FileHandle = fopen($filename, 'w+') or die("can't open file");
foreach($data as $line){
fputcsv($FileHandle, $line, ';', '"');
}
fclose($FileHandle);
?>
When i start that, i get a 2 errors and script nothing do :
[Sun Mar 26 18:39:02.773349 2017] [:error] [pid 22066] [client XX.XX.XX.XX:53498] PHP Warning: file_get_contents(): Filename cannot be empty in /www/public_html/simple_html_dom.php on line 76
[Sun Mar 26 18:39:02.773734 2017] [:error] [pid 22066] [client XX.XX.XX.XX:53498] PHP Fatal error: Call to a member function find() on boolean in /www/public_html/sko.php on line 12