To implement the following functions: Upload the source code to the web site.
First, use Upload. exp to implement automatic FTP upload]
#! /Usr/bin/empty CT <br/> set timeout 10 <br/> set username yourusername <br/> set password yourpassword <br/> set host iptvcn.info <br/> set prompt ftp> <br/> set srcfile [lindex $ argv 0] <br/> set dstfile [lindex $ argv 1] <br/> spawn FTP $ host <br/> reverse CT" name "{send" $ username/R "} <br/> your CT" password: "{send" $ password/R "} <br/> your CT" $ prompt "{send" cd cpp/R "} <br/> your CT" $ prompt "{send" put $ srcfile $ dstfile/R "} <br/> reverse CT" $ prompt "{send" Bye/R "}
Because my space is hosted in free Godaddy space, all pages are embedded with Godaddy ads, and all source code files need to be processed, the function is to replace <> with & LT and & gt:
[Upload. Sh]
#! /Bin/sh <br/> file = $1 <br/> echo '<PRE>'> $. TMP <br/> SED's/<// </G' $1 | SED's/> //>/G'> $. TMP <br/> echo '</PRE>'> $. TMP <br/>/usr/bin/upload CT upload. exp $. TMP $ file <br/> RM-RF $. TMP
Usage:
./Upload. Sh test. cpp
Files are stored in the CPP directory of the site by default.
The next goal is to highlight the code syntax.