To capture the encoding from the XML tag of the file. We need to read the first line, and pass it to the function to capture the encoding value.
The first line looks like this:
< ?xml version="1.0" encoding="utf-8"? >
The PHP code:
PLAIN TEXT
PHP:
function readfirstline($file){
$fp = @fopen($file, "r");
$firstline = fgets($fp);
fclose($fp);
return $firstline;
}
function get_attr( $line [...]
Parse error: syntax error, unexpected T_STRING in /mounted-storage/home118b/sub001/sc16660-QHQQ/www/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 4