Closed mmashraf closed 4 years ago
<?php
include('phprouter/PHPRouter.php'); $router = new CiscoRouter('58.2.x.x', 'ash', 'test123'); $router->connect(); $router->enable('enable'); $config = $router->exec('show run'); $router->disconnect();
echo $config;
?>
Hi,
The code uses some features only available in PHP 7.
PHP 5 has been EOL since Dec 31st 2018.
It could probably be made to work by changing instances where I've used the [ ]
syntax for arrays to be array()
but I'd recommend upgrading to php 7.
I just copy base code for ssh to my router but it does not work and prompt me following error
PHP Parse error: syntax error, unexpected '[' in /var/www/test/phprouter/impl/NetworkDevice.php on line 64