hipeng 发表于 2009-4-9 20:10:28

帮忙检查很小一段简单代码

配置文件user.ini


user=hipeng
passwords=159
path=C:\Program Files\彩影软件\ARP防火墙单机版\AntiARP.exe

程序文件

$user=IniRead("user.ini","system","user","")
$passwords=iniread("user.in","system","passwords","")
$path=iniread("user.ini","system","path","")
RunAs($user,"",$passwords,"",$path)



运行后,什么结果也没有出现。
我单独运行RunAs("hipeng","","159","","C:\Program Files\彩影软件\ARP防火墙单机版\AntiARP.exe")
是可以成功的。不知道哪里出错了。

[ 本帖最后由 hipeng 于 2009-4-10 12:40 编辑 ]

boyhong 发表于 2009-4-9 20:16:00

加上路径试试~~~
$user=IniRead(@ScriptDir&"\user.ini","system","user","")
$path=iniread((@ScriptDir&"\user.ini","system","path","")
RunAs($user,"",$passwords,"",$path)

hipeng 发表于 2009-4-9 20:30:35

还是调试不成功,我运行这句是可以成功的:
RunAs("hipeng","","159","","C:\Program Files\彩影软件\ARP防火墙单机版\AntiARP.exe")
但是运行这句是不成功的:
RunAs($user,"",$passwords,"",$path)
如何给$user,$passwords加上引号??

rho123 发表于 2009-4-9 20:46:21

' " '&$passwords&' " '好像回答过你的问题了
页: [1]
查看完整版本: 帮忙检查很小一段简单代码