$exec = exec("net use LPT1: \\XXXXXX\PRINTER1 \\PERSISTENT:YES");
$exec = exec("E:");
$exec = exec("COPY OUT.TXT LPT1");
试过 shell_exec
$exec = shell_exec("net use LPT1: \\XXXXXX\PRINTER1 \\PERSISTENT:YES");
$exec = shell_exec("E:");
$exec = shell_exec("COPY OUT.TXT LPT1");
尝试过
$exec = popen("net use LPT1: \\XXXXXX\PRINTER1 \\PERSISTENT:YES", "r");
$exec = popen("E:", "r");
$exec = popen("COPY OUT.TXT LPT1", "r");
我已经在我的代码中尝试了所有这些,但我无法执行它..任何人都可以提供解决方案