D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
erubis-2.7.0
/
examples
/
basic
/
Filename :
example.ecpp
back
Copy
<% #include <string> #include <iostream> #include <sstream> int main(int argc, char *argv[]) { int i; std::stringstream _buf; %> <html> <body> <p>Hello <%= argv[0] %>!</p> <table> <tbody> <% for (i = 1; i < argc; i++) { %> <tr bgcolor="<%= i % 2 == 0 ? "#FFCCCC" : "#CCCCFF" %>"> <td><%= i %></td> <td><%= argv[i] %></td> </tr> <% } %> </tbody> </table> </body> </html> <% std::string _output = _buf.str(); std::cout << _output; return 0; } %>