thinks 现在搞定了输入输出,不过,就是用exec();怎么没有办法调用程序运行的呢? 试了好多次,改输入后,输出没变.还是最开始的东西. 也就是程序没有成功调用... yunexec: 执行外部程序。
system: 执行外部程序并显示输出资料。
passthru: 执行外部程序并不加处理输出资料。 三个我都用过了... 另: 要调xx.exe用应该是如下写法的吧...exec("c:\\www\\pr\\xx.exe");谢谢!
system: 执行外部程序并显示输出资料。
passthru: 执行外部程序并不加处理输出资料。 三个我都用过了... 另: 要调xx.exe用应该是如下写法的吧...exec("c:\\www\\pr\\xx.exe");谢谢!
***************
这个是在 php.ini吗?
问题是我的php.ini 里
safe_mode = off 呀...
还是别的什么?请教请教...
if($fp = fopen("D:\\usr\\www\\dsi_html\\include\\function\\bdinput.txt","w+"))
{
// PHPINFO();$string = "1,1
0.22, 544, .0079, .02, 173, 1.5, 207000, .33, .12, 1.5,1
5,5,90,90,5,5,90,90,.076,5,85,0";echo $instring;echo "<p>************************<p>";fputs ($fp,$instring);$input = file("D:\\usr\\www\\dsi_html\\include\\function\\bdinput.txt");echo $input[0];
echo "<p>";
echo $input[1];
echo "<p>";
echo $input[2];
echo "<p>************************<p>";//exec("D:\\usr\\www\\dsi_html\\include\\function\\dsibead.exe");//passthru("D:\\usr\\www\\dsi_html\\include\\function\\dsibead");//system("D:\\usr\\www\\dsi_html\\include\\function\\dsibead.exe");//以上三个... 用哪一个都不行... 我搞了好久了... 不知道是哪点错了...
//这儿就是要调用这个exe文件... 它生成一个fort.10 文本文件...$outfile = file("D:\\usr\\www\\dsi_html\\include\\function\\fort.10");
echo $outfile[15];
echo "<p>";
echo $outfile[16];
echo "<p>";
echo $outfile[17];
echo "<p>";
echo $outfile[18];
//printf($string);
}?>
下面是php.ini 里safe_mode部份...; Safe Mode
;
safe_mode = off; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = off; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
safe_mode_include_dir = ; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir = ; Setting certain environment variables may be a potential security breach.
; This directive contains a comma-delimited list of prefixes. In Safe Mode,
; the user may only alter environment variables whose names begin with the
; prefixes supplied here. By default, users will only be able to set
; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
;
; Note: If this directive is empty, PHP will let the user modify ANY
; environment variable!
safe_mode_allowed_env_vars = PHP_; This directive contains a comma-delimited list of environment variables that
; the end user won't be able to change using putenv(). These variables will be
; protected even if safe_mode_allowed_env_vars is set to allow to change them.
safe_mode_protected_env_vars = LD_LIBRARY_PATH; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions =; This directive allows you to disable certain classes for security reasons.
; It receives a comma-delimited list of class names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_classes =明明是什么都没开启的嘛... 大家一定帮我看看的嘛...