1. How to Use the iconv function in PHP
Http://www.jb51.net/article/14530.htm
URL-based Chinese garbled characters
Http://www.blogjava.net/freeman1984/archive/2010/06/07/322965.html
2. url-based Chinese garbled characters. You must set the page encoding mode not only in PHP code, but also in PHP Code. For example:
<? PHP header ("Content-Type: text/html; charset = utf8");?> // Set the encoding style in PHP
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/> // sets the HTML page encoding method.
3. // page Jump
Example: <SCRIPT>
Function confirm (){
VaR content = Document. getelementbyid ('reply'). value;
VaR xjl = Document. getelementbyid ('conf'). Name;
If (content. Length = 0)
Alert ("the reply content cannot be blank! ");
Else {
Window. Location. href = encodeuri ("addreply. php? Content = "+ content +" & FH = "+ xjl );
}
}
</SCRIPT>
Use Js in PHP to redirect
$ Url = "http://rs.xidian.edu.cn/bbs ";
Echo "<script language = 'javascript 'Type = 'text/JavaScript '> ";
Echo "Top. Location. href = '$ url '";
Echo "</SCRIPT> ";
Window. Location. href "," location. href "is the current page Jump
"Parent. Location. href" is the previous page Jump
"Top. Location. href" is the outermost page Jump
Example:
If A, B, C, and D are all JSP, D is the IFRAME of C, C is the IFRAME of B, and B is the IFRAME of A, if Js in D is written like this
"Window. Location. href", "location. href": D page Jump
"Parent. Location. href": C page Jump
"Top. Location. href": a page Jump
If form exists on Page D,
<Form>: Jump to the D page after the form is submitted
<Form target = "_ blank">: a new page is displayed after the form is submitted.
<Form target = "_ parent">: C page jump after form is submitted
<Form target = "_ top">: Jump to page a after form is submitted
For page refresh, write the following in page D:
"Parent. location. reload (); ": refreshes the C page (of course, you can also use the opener object of the Child Window to obtain the parent window object: zookeeper opener.doc ument. location. reload ();)
"Top. Location. Reload ();": page a is refreshed.