开发者

Problem with ftp write from windows to linux and making cgi executable

I read the script from clipboard:// and write it to a linux ftp server:

#!/home/myaccount开发者_如何转开发/cgi-bin/rebol -c
Rebol []

mywhois: func[thedomain /local whois][

    whois: read rejoin [whois:// thedomain "@" "whois.internet.bs"]
    parse whois [to "Expiry Date: " thru "Expiry Date: " copy Expiry-Date to newline]
    Expiry-Date
]

parse system/script/path [thru "/" thru "/" thru "/"  copy domain to "/"]
expiration-date: mywhois domain
info: rejoin ["Expiration of " domain ": " expiration-date]
print info
print "<br>"
print rejoin ["IP Lookup: " read rejoin [dns:// domain]]
print ""

When I chmod this file to 755, the cgi doesn't work, whereas it works when I upload it with a ftp software.


If the same script works when uploaded via ftp, but doesn't work when copied another way, then they are not the same. You have to check to remove tabs and to make sure line endings are the same.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜