请教PHP中exec的问题
<html>
<head>
<title>hello </title>
</head>
<body>
<input type="button" value="Click" onClick="exec()">
<?php
exec("D:\Resource\music\KWMUSIC/KwMusic.exe E:\music\23945961246827.mp3",$out);
?>
</body>
</html>
这段代码有什么不对吗?为什么运行不出来?我是菜鸟,期望大家的帮助!
似乎得控制台程序才可以吧?
另外,注意这点(限定路径):
Note: When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not allowed to have .. components in the path to the executable.
LuciferStar:
你好!
能不能说详细点?没太明白控制台程序是什么意思?
exec好像是执行shell命令。楼主的好像不是啊
可以试试用system函数,手册里面自己翻下
Note: When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not allowed to have .. components in the path to the executable.
当php.ini里,safemode被打开,则exec只能执行safe_mode_exec_dir设定的路径下的程序。其它路径下的将被禁止。
以前我试过exec一个cmd.com,可以得到结果,但是,没有试过除DOS之外的.EXE.
我想问一下Php中safe_mode_exec_dir在哪里设置啊?
西安网站建设,网站SEO优化http://www.gttsoft.cn
{{----}
相关问答:
<?php
if($_SERVER['HTTP_REFERER']!=''){
@header("Content-type:image/jpeg");
echo file_get_contents("xlight.jpg");
}
else{
@header("location:ht ......
<?php
if($_SERVER['HTTP_REFERER']!=''){
@header("Content-type:image/jpeg");
echo file_get_contents("xlight.jpg");
}
else{
@header("location:ht ......
请问:哪些UML建模工具在php好使用?
我找了好长时间都没有找到个适合的。麻烦哪位可以提供个,本人不胜感激
PowerDesigner加一个PHP插件就可以实现了
给你一个下载地址吧:http://www.onlycto.com/files/php ......
请问一下各位大虾,我用php做个网页游戏,当然是最垃圾的那种html的,
现在我想把所有玩家和怪物,npc的数据储存,
当然,数据库中当然有,但是我又不想过多的去查询数据库,
比如战斗系统,肯定要先初始化双方数 ......