在这个地方的for循环(tempus循环和research_academic循环)中无法读取null的属性'marker':
$gestor = fopen("files/prueba.pim", 'r');
$output = fopen('files/output.txt', 'w');
// Test if fopen() succeeded for both files
if ($gestor == FALSE || $output == FALSE) {
// Handle the error somehow (return from function or exit the program
// or display an error, it depends on your application).
exit(1);
}
// Read, process, write
while (($datos = fgetcsv($gestor, 1000, "<br>")) !== FALSE) {
$processed = FALSE;
$numero = count($datos);
for ($c = 0; $c < $numero; $c ++) {
if ("G81" == substr($datos[$c], 0, 3)) {
fwrite($output, "COMIENZO DE CICLO".PHP_EOL);
$processed = TRUE;
} else {
// if (";" != substr($datos[$c], 0, 1)) {
// echo utf8_encode($datos[$c]."\n");
// }
if ("X" == substr($datos[$c], 0, 1) or "Y" == substr($datos[$c], 0, 1)) {
fwrite($gestor, "TEST".PHP_EOL);
$processed = TRUE;
}
}
}
// Here you probably need to fwrite($output) the rows that didn't match
// the conditions above (nothing was output for them)
//
// This is how I would write it:
// if (! $processed) {
// fwrite($gestor, implode('<br>', $datos).PHP_EOL);
// } ^
// +---------------------------+
// Put here the same string you used as the third argument to fgetcsv()
}
// Close both files then rename them
fclose($gestor);
fclose($output);
// Remove the previous backup, if any
if (file_exists('files/prueba.pim.backup')) {
unlink('files/prueba.pim.backup');
}
// Backup the input file
rename('files/prueba.pim', 'files/prueba.pim.backup');
// Replace the input file with the output file
rename('output.txt', 'files/prueba.pim.backup');
我试图解决它,但我没有想法。
ra.marker.infowin.open(map,ra.marker);
答案 0 :(得分:0)
更改以下内容:
var ra = get_mark_by_geo(event.latLng.k, event.latLng.B);
到
var ra = get_mark_by_geo(event.latLng.A, event.latLng.F);