■リンクをクリックすると出るエラー
【1】Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
【2】apache error log
[Thu Jul 30 19:29:52 2015] [error] [client ::1] (8)Exec format error: exec of '/Applications/MAMP/cgi-bin/result.csv' failed, referer: http://localhost:8888/cgi-bin/test261.cgi
[Thu Jul 30 19:29:52 2015] [error] [client ::1] Premature end of script headers: result.csv, referer: http://localhost:8888/cgi-bin/test261.cgi
■状況
・MacにMAMP(apache2.2)をいれている
− $ httpd -v #Server version: Apache/2.2.29 (Unix)
・パーミッション
− result.csvのパーミッションは755
− cgi-binフォルダのパーミッションも755
■やりたいこと
1)MAMP/htdocs内のhtmlファイルから、cgi-binフォルダ内のtest261.cgiにリンク。
2)cgi-bin
#!/Users/ore/.rvm/rubies/ruby-1.9.2-head/bin/ruby
print "Content-type: text/html\n\n"
require "cgi"
で、
print "<a href=result.csv>"
print "get result csv"
print "</a>"
上記のリンクを押させることで、csvファイルをDLさせたい。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。