作者mozan (想你的原因)
看板PHP
标题[请益] exec执行外部程式
时间Mon Jul 9 12:45:25 2007
我写了一支程式
9
10 fptr=fopen("myOut", "w+");
11 fptr2=fopen("input.txt", "r+");
12 printf("test!!!");
13 while(!feof(fptr2))
14 {
15 fgets(tmp, 199, fptr2);
16 fputs(tmp, fptr);
17 }
18 return 0;
用exec:('./a.out');
myOut有开起来了可是内容是空的...
不知道为什麽?
请问有人可以帮我解答一下吗?
我也尝试过system 和 shell_exec
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.123.104.233
1F:推 LiloHuang:单独执行ok吗? 可能是权限问题 把相关档案都设定777 07/09 13:13
2F:推 danshu:之前刚好遇到 要把a.out的资料夹权限改成777 07/09 13:23