Blogger搬家
blogspot经常访问不了,据说是被封,受不了,转到blogger spaces 了。
本来想弄到自己的服务器上不知道什么原因老是无法完成,转移时在我的ftp上blogger的ftp创建了目录结构就是传不了文件,老是超时,郁闷
转到blogger spaces也挺不错的,以后可以把自己的blogger中的东西备份到自己的服务器上
希望以后我的blogger能够正常!
标签: blog
blogspot经常访问不了,据说是被封,受不了,转到blogger spaces 了。
标签: blog
对Ajax了解过一些,但一直没有实践过,最近学习Perl,昨天用ppm安装Module的时候无意中发现有个叫CGI::Ajax的模块,今天装上并弄了个示例程序测试了一下,感觉不错比较简单。
Perl简洁实用,非常符合程序员的思想。
CGI.pm Method Groupings
Group Description
:all Contains all of the methods available in the CGI.pm module
:cgi Contains methods specific to the CGI protocol
:form Contains methods used to generate forms
:html A superset of the :html2, :html3, :html4, and :netscape groups
:html2 Contains methods that enable the developer to quickly use elements from theHTML version 2 specification
:html3 Like the :html2 group, contains methods that enable the developer to quickly use elements from the HTML version 3 specification
:html4 Contains methods that enable the developer to quickly use elements from theHTML version 4 specification
:netscape Contains the Netscape extensions for the HTML 3 specification, including a shortcut to my favorite HTML tag <BLINK>
:multipart Contains methods used to help work with MIME types
:standard Probably the most frequently used group of methods, a superset of the :html2,:html3, :html4, :form, and :cgi groups
A function-oriented Fashion CGI
#!/usr/bin/perl –T
use strict;
use CGI ':standard';
print header;
print start_html('Hello World');
print h1('Hello World');
print end_html();
exit;
An object-oriented Fashion CGI
#!/usr/bin/perl –T
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header;
print $cgi->start_html('Hello World');
print $cgi->h1('Hello World');
print $cgi->end_html();
exit;
The CGI module has a large number of functions to make the life of the programmer easier. These functions range from those that create HTML tags, HTTP headers, and cookies to those for working with web forms.
HTML Shortcuts
Most of the HTML version 3 and 4 tags are available through a function in the CGI module. Simply calling the HTML function with a print statement will cause it to be sent to the outputted page.
Dynamic Pages and Forms
Just as standard HTML elements are available through functions in the CGI module, so are form elements. For example, tags to start and end forms, code for text fields and other input fields, and code for buttons are available as CGI module functions. The syntax for these functions is the same as the syntax for calling HTML tag functions.
Printing the Name Input Using the CGI Module
#!/usr/bin/perl -T
use strict;
use CGI qw/:standard/;
print header,
start_html('Hello'),
start_form,
"Enter your name: ",textfield('name'),
submit,
end_form,
hr;
if (param()) {
print "Hello ",
param('name'),
p;
}
print end_html;
exit;
Cookies
A Simple Cookie Example
#!/usr/bin/perl -T
use strict;
print "Content-type: text/html\n";
print "Set-Cookie: testcookie=testvalue;";
print "\n\n";
print "You've received a cookie<p>\n";
exit;
Post by Word2007