我喜欢通过coldfusion中的cfm页面运行shell脚本(例如abc.sh),它的工作方式就像./abc.sh
<form method="post" action="#request.myself#migrate.mup"
name="uploadForm" enctype="multipart/form-data">
<input name="FileContents" type="file" value"get file">
</br></br></br>
<input name="submit" type="submit" value="Upload File">
</form>
<cfif isDefined("Form.FileContents") >
<!--- If TRUE, upload the file. --->
<cffile action = "upload"
fileField = "FileContents"
destination = "../../../../Tests/migration/"
mode = "775"
accept = "text/xml"
> Done......File Uploaded
<CFEXECUTE
NAME="/abc.sh"
TIMEOUT="999">
</CFEXECUTE>
我的abc.sh文件是
#!/bin/sh
#insert data
./lq.sh data.xml migrate
我喜欢执行abc.sh(os是linux)