This question already has an answer here:
I have a trap array I want to print in html and to echo in php array
content looks like the picture.
it cannot show the complete message and when I try to echo the message in php
I get "Parse error: syntax error, unexpected 'ROUTING' (T_STRING), expecting ',' or ';'".
<body>
<p>
#<SNMP::SNMPv1_Trap:0x278a2258 @enterprise=[1.3.6.1.4.1.9.9.41.2], @timestamp=#<SNMP::TimeTicks:0x16c779e6 @value=1877211447>, @varbind_list=[#<SNMP::VarBind:0x30066c8e @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.2.0], @value="ROUTING-MSDP">, #<SNMP::VarBind:0x46681034 @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.3.0], @value=#<SNMP::Integer:0x6b4d4956 @value=6>>, #<SNMP::VarBind:0x7fda94e8 @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.4.0], @value="INIT_STDBY_PEER_UP_DOWN">, #<SNMP::VarBind:0x7cbbe581 @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.5.0], @value="down: : received socket disconnect notification ">, #<SNMP::VarBind:0x7ad4b392 @name=[1.3.6.1.4.1.9.9.41.1.2.31.6.0], @value=#<SNMP::TimeTicks:0x7b525267 @value=1877211368>>], , @agent_addr=#<SNMP::IpAddress:0x5084f431 @value="xD3O0x83">, @generic_trap=6>
</p>
<br>
<?php
echo "#<SNMP::SNMPv1_Trap:0x278a2258 @enterprise=[1.3.6.1.4.1.9.9.41.2], @timestamp=#<SNMP::TimeTicks:0x16c779e6 @value=1877211447>, @varbind_list=[#<SNMP::VarBind:0x30066c8e @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.2.0], @value=>, #<SNMP::VarBind:0x46681034 @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.3.0], @value=#<SNMP::Integer:0x6b4d4956 @value=6>>, #<SNMP::VarBind:0x7fda94e8 @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.4.0], @value=">, #<SNMP::VarBind:0x7cbbe581 @name=[1.3.6.1.4.1.9.9.41.1.2.3.1.5.0], @value="peer down:: received socket disconnect notification ">, #<SNMP::VarBind:0x7ad4b392 @name=[1.3.6.1.4.1.9.9.41.1.2.31.6.0], @value=#<SNMP::TimeTicks:0x7b525267 @value=1877211368>>], , @agent_addr=#<SNMP::IpAddress:0x5084f431 @value="xD3O0x83">, @generic_trap=6>";
?>
</body>
Aucun commentaire:
Enregistrer un commentaire