Вы можете использовать встроенную функцию is_null
while ($row = mysql_fetch_array($RS2)) {
foreach ($row as $key => $value) {
if (is_null($value)) {
$var="<null>";
$row[$key] = htmlspecialchars($var);
}
}
echo "serno=$row[serno];";
echo "date=$row[date];";
echo "time=$row[time];";
echo "nett=$row[nett];";
echo "amount=$row[amt];";
echo "\n";
}
Комментарий @MedProgrammer позволил мне понять, что я забыл. Исправление java home относится только к Windows
static {
if (System.getProperty("os.name").toLowerCase().contains("windows")) { //Added this check
String h = System.getProperty("java.home");
if (!h.endsWith("jre")) {
h = h.replace("jre", "jdk") + File.separator + "jre";
System.setProperty("java.home", h);
}
}
JAVAC = ToolProvider.getSystemJavaCompiler();
}