Parse error: syntax error, unexpected 'ssh2_exec' (T_STRING)
Parse error: syntax error, unexpected 'ssh2_exec' (T_STRING)
我想使用 ssh 连接转储 mysql 数据库。
<?php
$vps_ip= 'xxxxxx';
$user="yyyy";
$passwd="zzzz";
$connection = ssh2_connect($vps_ip, 22);
ssh2_auth_password($connection, $user,$passwd);
$cmd="mysqldump -u root -pmypass database > /home/back.sql"
ssh2_exec($connection,$cmd);
?>
错误信息:
Parse error: syntax error, unexpected 'ssh2_exec' (T_STRING) in **** on line 7
我可以将 mysql 数据库转储到 /home/back。sql
mysqldump -u root -pmypass database > /home/back.sql
如何修复 'ssh2_exec' 中的解析器错误?
尝试:
$vps_ip= 'xxxxxx';
$user="yyyy";
$passwd="zzzz";
$connection = ssh2_connect($vps_ip, 22);
ssh2_auth_password($connection, $user,$passwd);
$cmd="mysqldump -u root -pmypass database > /home/back.sql" ; //ERROR IS HERE, MISSING ;
ssh2_exec($connection,$cmd);
我想使用 ssh 连接转储 mysql 数据库。
<?php
$vps_ip= 'xxxxxx';
$user="yyyy";
$passwd="zzzz";
$connection = ssh2_connect($vps_ip, 22);
ssh2_auth_password($connection, $user,$passwd);
$cmd="mysqldump -u root -pmypass database > /home/back.sql"
ssh2_exec($connection,$cmd);
?>
错误信息:
Parse error: syntax error, unexpected 'ssh2_exec' (T_STRING) in **** on line 7
我可以将 mysql 数据库转储到 /home/back。sql
mysqldump -u root -pmypass database > /home/back.sql
如何修复 'ssh2_exec' 中的解析器错误?
尝试:
$vps_ip= 'xxxxxx';
$user="yyyy";
$passwd="zzzz";
$connection = ssh2_connect($vps_ip, 22);
ssh2_auth_password($connection, $user,$passwd);
$cmd="mysqldump -u root -pmypass database > /home/back.sql" ; //ERROR IS HERE, MISSING ;
ssh2_exec($connection,$cmd);