我正在运行这个python脚本,其中python脚本的输出将显示在Web浏览器中,所以我正在使用PHP。我在python中使用netmiko来升级路由器。主要的问题是当我在CMD中运行python脚本时它完全有效,但是当我在Web浏览器中使用一些html和php运行它时并非所有脚本都没有运行。它给了我以下错误:
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter today's day: ");
String day = input.next();
int todayDay = changeToString(day);
System.out.println(todayDay);
}
public static int changeToString(String day) {
int dayName = 0;
switch (day) {
case "Monday":
dayName = 1;
break;
case "Tuesday":
dayName = 2;
break;
case "Wednesday":
dayName = 3;
case "Thursday":
dayName = 4;
case "Friday":
dayName = 5;
case "Saturday":
dayName = 6;
}
int dayselapsed = input.nextInt();
int futureday = (dayName + dayselapsed) % 7;
switch (futureday) {
case 0: System.out.println("In " + dayselapsed + " days, it will be Sunday");
break;
case 1: System.out.println("In " + dayselapsed + " days, it will be Monday");
break;
case 2: System.out.println("In " + dayselapsed + " days, it will be Tuesday");
break;
case 3: System.out.println("In " + dayselapsed + " days, it will be Wednesday");
break;
case 4: System.out.println("In " + dayselapsed + " days, it will be Thursday");
break;
case 5: System.out.println("In " + dayselapsed + " days, it will be Friday");
break;
case 6: System.out.println("In " + dayselapsed + " days, it will be Saturday");
break;
}
return 0;
}
}
这是python与netmiko
中的代码scp.SCPException: scp: c7200-ipbasek9-mz.150-1.M10.bin: No such file or directory
当我在网络浏览器中运行它时,它会在复制文件中停止,它会给我这个错误: