锘??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-鍔?#37716;?#37714;涢犳湭鏉ワ紒http://www.5432034.com/pdw2009/鏈珯涓嶅啀鏇存柊锛屾杩庡厜涓? <a href="http://php.11519.net/5jblog">java寮鍙戞妧鏈綉</a>zh-cnSat, 23 Mar 2019 13:09:40 GMTSat, 23 Mar 2019 13:09:40 GMT60 blackberry 鏃ュ織http://www.5432034.com/pdw2009/archive/2010/09/05/331088.html鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author>Sun, 05 Sep 2010 08:55:00 GMThttp://www.5432034.com/pdw2009/archive/2010/09/05/331088.htmlhttp://www.5432034.com/pdw2009/comments/331088.htmlhttp://www.5432034.com/pdw2009/archive/2010/09/05/331088.html#Feedback0http://www.5432034.com/pdw2009/comments/commentRss/331088.htmlhttp://www.5432034.com/pdw2009/services/trackbacks/331088.htmlpackage com.ff.utils;

import java.util.Date;

import net.rim.device.api.system.EventLogger;

/**
 * 鏃ュ織绫?br />  * @author   2010-09-04
 *
 */
public class Logger {

 private static final String SEPARATOR = "   ";
 private static final long GUID = 0x4c9d3452d880a2f1L;
 private static final String APP_NAME = "xxxc ";

 private Logger() {
  EventLogger.register(GUID, APP_NAME, EventLogger.VIEWER_STRING);
 }

 private static Logger logger = new Logger();

 public static Logger getLogger() {
  return logger;
 }

 /**
  * Log the information.
  *
  * @param message
  *            The message you will log
  */
 public void info(String message) {
  if (message == null || message.trim().equals(""))
   return;
  String log = "INFO: " + new Date().toString() + SEPARATOR + message;
  try {
   log = new String(log.getBytes(), "UTF-8");
   byte[] msg_bytes = log.getBytes();
   EventLogger.logEvent(GUID, msg_bytes, EventLogger.ALWAYS_LOG);
  } catch (Exception ex) {
   System.err.println(ex);
  }
 }

 public void error(Exception e) {
  StringBuffer log = new StringBuffer();
  log.append("ERROR: " + new Date().toString() + SEPARATOR);
  log.append(e.getMessage() + " \r\n ");

  try {
   byte[] msg_bytes = new String(log.toString().getBytes(), "UTF-8").getBytes();
   EventLogger.logEvent(GUID, msg_bytes);
  } catch (Exception ex) {
   System.err.println(ex);
  }
 }
 
 public void error(String message, Exception e) {
  StringBuffer log = new StringBuffer();
  log.append("ERROR: " + new Date().toString() + SEPARATOR);
  if (message != null || !message.trim().equals("")) {
   log.append("message: " + message + " \r\n ");
  }
  log.append("error: " + e.getMessage() + " \r\n ");

  try {
   byte[] msg_bytes = new String(log.toString().getBytes(), "UTF-8").getBytes();
   EventLogger.logEvent(GUID, msg_bytes);
  } catch (Exception ex) {
   System.err.println(ex);
  }
 }
}


涓嶇鏄湪妯℃嫙鍣?#26473;?#37828;湡鏈?#38171;屾棩?#32340;杩?#37828;?#36423;呴』鐨?.....濡傛灉璇ユ枃瀵逛?#29363;?#22796;敤锛?#28051;?#27996;嗚〃绀?#28725;逛?#28358;?#37928;勬敮?#23508;锛岄夯鐑︿綘鍗曞嚮涓涓?#28051;?#38344;?#37928;?#39582;垮憡锛岃阿?#38463;



]]>
libxml涓?#28003;跨敤xpath瑙f瀽xml?#26499;?#27426;http://www.5432034.com/pdw2009/archive/2010/08/23/329638.html鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author>Mon, 23 Aug 2010 04:06:00 GMThttp://www.5432034.com/pdw2009/archive/2010/08/23/329638.htmlhttp://www.5432034.com/pdw2009/comments/329638.htmlhttp://www.5432034.com/pdw2009/archive/2010/08/23/329638.html#Feedback2http://www.5432034.com/pdw2009/comments/commentRss/329638.htmlhttp://www.5432034.com/pdw2009/services/trackbacks/329638.html #include <libxml/xpath.h>                                                            
#include <stdio.h>                                                                   
                                                                                     
xmlDocPtr  getdoc (char *docname) {                                                  
 xmlDocPtr doc;                                                                     
 doc = xmlParseFile(docname);                                                       
                                                                                    
 if (doc == NULL ) {                                                                
  fprintf(stderr,"Document not parsed successfully. \n");                          
  return NULL;                                                                     
 }                                                                                  
                                                                                     
 return doc;                                                                        
}                                                                                    
                                                                                     
xmlXPathObjectPtr  getnodeset (xmlDocPtr doc, xmlChar *xpath){                       
                                                                                    
 xmlXPathContextPtr context;                                                        
 xmlXPathObjectPtr result;                                                          
                                                                                     
 context = xmlXPathNewContext(doc);                                                 
 if (context == NULL) {                                                             
  printf("Error in xmlXPathNewContext\n");                                         
  return NULL;                                                                     
 }                                                                                  
 result = xmlXPathEvalExpression(xpath, context);                                   
 xmlXPathFreeContext(context);                                                      
 if (result == NULL) {                                                              
  printf("Error in xmlXPathEvalExpression\n");                                     
  return NULL;                                                                     
 }                                                                                  
 if(xmlXPathNodeSetIsEmpty(result->nodesetval)){                                    
  xmlXPathFreeObject(result);                                                      
    printf("No result\n");                                                           
  return NULL;                                                                     
 }                                                                                  
 return result;                                                                     
}                                                                                    
                                                                                     
                                                                                     
                                                                                     
                                                                                     
                                                                                     
int main(int argc, char **argv) {                                                    
                                                                                     
 char *docname;                                                                     
 xmlDocPtr doc;                                                                     
 xmlChar *xpath = (xmlChar*) "http://keyword";                                           
 xmlNodeSetPtr nodeset;                                                             
 xmlXPathObjectPtr result;                                                          
 int i;                                                                             
 xmlChar *keyword;                                                                  
                                                                                   
 if (argc <= 1) {                                                                   
  printf("Usage: %s docname\n", argv[0]);                                          
  return(0);                                                                       
 }                                                                                  
                                                                                     
 docname = argv[1];                                                                 
 doc = getdoc(docname);                                                             
 result = getnodeset (doc, xpath);                                                  
 if (result) {                                                                      
  nodeset = result->nodesetval;                                                    
  for (i=0; i < nodeset->nodeNr; i++) {                                            
   keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1);  
    printf("keyword: %s\n", keyword);                                              
    xmlFree(keyword);                                                              
  }                                                                                
  xmlXPathFreeObject (result);                                                     
 }                                                                                  
 xmlFreeDoc(doc);                                                                   
 xmlCleanupParser();                                                                
 return (1);                                                                        
}                                                                                

demo.xml

 <?xml version="1.0" encoding="UTF-8"?>                 
<story>                                                
  <storyinfo>                                          
    <author>John Fleck</author>                        
    <datewritten>June 2, 2002</datewritten>            
    <keyword>example keyword瑁?lt;/keyword>                
  </storyinfo>                                         
  <body>                                               
    <headline>This is the headline</headline>          
    <para>This is the body text.</para>                
  </body>                                              
</story>                                                
    
                                                                                     

鎭?#29831;?#29999;?#37719;曞嚮涓涓?#39582;垮憡


]]>
SessionBean ejb鍏ラ棬渚?#28699;?/title><link>http://www.5432034.com/pdw2009/archive/2010/04/15/318414.html</link><dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator><author>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author><pubDate>Thu, 15 Apr 2010 06:29:00 GMT</pubDate><guid>http://www.5432034.com/pdw2009/archive/2010/04/15/318414.html</guid><wfw:comment>http://www.5432034.com/pdw2009/comments/318414.html</wfw:comment><comments>http://www.5432034.com/pdw2009/archive/2010/04/15/318414.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/pdw2009/comments/commentRss/318414.html</wfw:commentRss><trackback:ping>http://www.5432034.com/pdw2009/services/trackbacks/318414.html</trackback:ping><description><![CDATA[<p> </p> 鍋?#26473;?#28052;堝骞磈ava绗?#28051;娆″啓ejb鐨?#28186;?#28699;?#38171;?#26473;橀渶瑕佺户缁?#37716;?#37716;?br /> <a href="http://www.5432034.com/Files/pdw2009/ejb2test.zip">涓嬭浇鍦板潃</a> <br /> <script type="text/javascript"><!-- branchr_client_id = 'i5x9suaaicn0eb41ts2q2823gn'; branchr_ad_width = 468; branchr_ad_height = 60; branchr_ad_format = 11; //--></script> <script type="text/javascript" src="http://static.branchr.com/serve.js?1248290004"></script> <br /><img src ="http://www.5432034.com/pdw2009/aggbug/318414.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/pdw2009/" target="_blank">鏈夌尗鐩镐即鐨?#37827;?#28699;?/a> 2010-04-15 14:29 <a href="http://www.5432034.com/pdw2009/archive/2010/04/15/318414.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>mysql瀛?#32471;?#28051;?#37713;?#37825;?#28003;跨敤绗?#29825;?/title><link>http://www.5432034.com/pdw2009/archive/2009/05/19/271603.html</link><dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator><author>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author><pubDate>Tue, 19 May 2009 14:50:00 GMT</pubDate><guid>http://www.5432034.com/pdw2009/archive/2009/05/19/271603.html</guid><wfw:comment>http://www.5432034.com/pdw2009/comments/271603.html</wfw:comment><comments>http://www.5432034.com/pdw2009/archive/2009/05/19/271603.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/pdw2009/comments/commentRss/271603.html</wfw:commentRss><trackback:ping>http://www.5432034.com/pdw2009/services/trackbacks/271603.html</trackback:ping><description><![CDATA[<br /> <script type="text/javascript"><!-- branchr_client_id = 'i5x9suaaicn0eb41ts2q2823gn'; branchr_ad_width = 468; branchr_ad_height = 60; branchr_ad_format = 11; //--></script> <script type="text/javascript" src="http://static.branchr.com/serve.js?1248290004"></script> <br /> 鏈杩戣寮濮?#28003;跨敤MySQL璁扮偣绗?#29825;?#37510;?br /> <br /> select left("http://www.webmasterclub.org/&id=1310",instr("http://www.webmasterclub.org/&id=1310",'&')-1 )<br /> <br /> left鍑?#37825;?#38171;?#26473;?#37733;炲乏杈圭壒瀹氶?#22446;害鐨?#28699;?#32471;?#28051;?#37713;?#37825;?#37510;?br /> <br /> instr(str,substr)杩?#37733;瀞ubstr瀛?#32471;?#28051;插湪str瀛?#32471;?#28051;?#28051;?#37928;?#28003;嶇疆銆?br /> <dt><code><font face="?#26570;瀹?#28003;?><strong>LOCATE(substr,str)</strong></font></code> locate涔?#37828;?#26473;?#37733;?#28699;?#32471;?#28051;?#37928;?#28003;嶇疆锛屼絾locate鍑?#37825;?#38171;?#28699;?#28699;?#32471;?#28051;插湪鍓?#38344;?#37510;?br /> <br /> substring(str,2,9)锛?#26473;?#37733;瀞tr瀛?#32471;?#28051;?#28051;?#28000;?#32471;?涓?#28003;嶇疆寮濮?#37928;?涓?#28699;?#32471;?#37510;傜敤娉?#28051;巑id鐩稿悓<br /> <br /> insert(str,startpos,len,substr) 瀛?#32471;?#28051;?#37831;?#37817;?#37713;?#37825;?#38171;屾?#22932;tr瀛?#32471;?#28051;瞫tartpos寮濮?#38171;宭en缁?#37833;?#37928;?#28699;?#32471;?#28051;茬敤substr鏇?#37817;? <dt><br /> select replace ('aaBBC','aB',"PPPPPP") 瀛?#32471;?#28051;?#29785;勬崲 <dt><br /> 娉ㄦ剰锛歮ysql澶勭悊瀛?#32471;?#28003;嶇疆鏃?#37828;?#28000;?涓哄簭鍒楀惎濮?#37510;?br /> </dt><img src ="http://www.5432034.com/pdw2009/aggbug/271603.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/pdw2009/" target="_blank">鏈夌尗鐩镐即鐨?#37827;?#28699;?/a> 2009-05-19 22:50 <a href="http://www.5432034.com/pdw2009/archive/2009/05/19/271603.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>android 寮?#37713;?#22935;?/title><link>http://www.5432034.com/pdw2009/archive/2009/04/22/267053.html</link><dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator><author>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author><pubDate>Wed, 22 Apr 2009 14:31:00 GMT</pubDate><guid>http://www.5432034.com/pdw2009/archive/2009/04/22/267053.html</guid><wfw:comment>http://www.5432034.com/pdw2009/comments/267053.html</wfw:comment><comments>http://www.5432034.com/pdw2009/archive/2009/04/22/267053.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.5432034.com/pdw2009/comments/commentRss/267053.html</wfw:commentRss><trackback:ping>http://www.5432034.com/pdw2009/services/trackbacks/267053.html</trackback:ping><description><![CDATA[<br /> <script type="text/javascript"><!-- branchr_client_id = 'i5x9suaaicn0eb41ts2q2823gn'; branchr_ad_width = 468; branchr_ad_height = 60; branchr_ad_format = 11; //--></script> <script type="text/javascript" src="http://static.branchr.com/serve.js?1248290004"></script> <br /> 浠?#37934;佺?#22248;<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> QuitApp() {<br />         </span><span style="color: #0000ff">new</span><span style="color: #000000"> AlertDialog.Builder(Frm_Addbills.</span><span style="color: #0000ff">this</span><span style="color: #000000">).setTitle(</span><span style="color: #000000">"</span><span style="color: #000000">鎻?#32448;?/span><span style="color: #000000">"</span><span style="color: #000000">).setMessage(<br />                 </span><span style="color: #000000">"</span><span style="color: #000000">纭?#28729;氶鍑?</span><span style="color: #000000">"</span><span style="color: #000000">).setIcon(R.drawable.quit).setPositiveButton(</span><span style="color: #000000">"</span><span style="color: #000000">纭?#28729;?/span><span style="color: #000000">"</span><span style="color: #000000">,<br />                 </span><span style="color: #0000ff">new</span><span style="color: #000000"> DialogInterface.OnClickListener() {<br />                     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> onClick(DialogInterface dialog, </span><span style="color: #0000ff">int</span><span style="color: #000000"> whichButton) {    <br />                         billdb.close();<br />                         finish();<br />                     }<br />                 }).setNegativeButton(</span><span style="color: #000000">"</span><span style="color: #000000">鍙栨秷</span><span style="color: #000000">"</span><span style="color: #000000">,<br />                 </span><span style="color: #0000ff">new</span><span style="color: #000000"> DialogInterface.OnClickListener() {<br />                     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> onClick(DialogInterface dialog, </span><span style="color: #0000ff">int</span><span style="color: #000000"> whichButton) {<br />                     }<br />                 }).show();<br /> <br />     }</span></div> <br /> copy from ColaBox_source  ?#28269;瀹屽?#21615;画..<br /> <br /><img src ="http://www.5432034.com/pdw2009/aggbug/267053.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/pdw2009/" target="_blank">鏈夌尗鐩镐即鐨?#37827;?#28699;?/a> 2009-04-22 22:31 <a href="http://www.5432034.com/pdw2009/archive/2009/04/22/267053.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>android 涓?#28003;跨敤sqLite渚?#28699;?/title><link>http://www.5432034.com/pdw2009/archive/2009/04/19/266460.html</link><dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator><author>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author><pubDate>Sun, 19 Apr 2009 14:20:00 GMT</pubDate><guid>http://www.5432034.com/pdw2009/archive/2009/04/19/266460.html</guid><wfw:comment>http://www.5432034.com/pdw2009/comments/266460.html</wfw:comment><comments>http://www.5432034.com/pdw2009/archive/2009/04/19/266460.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.5432034.com/pdw2009/comments/commentRss/266460.html</wfw:commentRss><trackback:ping>http://www.5432034.com/pdw2009/services/trackbacks/266460.html</trackback:ping><description><![CDATA[<p>浠婃櫄?#21843;浜?#28051;猻qLite鐨?#25652;旂敤渚?#28699;?#38171;?#32494;?#28051;涓嬩唬?#29212;锛屽氨涓?#29831;?#32513;?#29831;?#26473;?#27996;?#37510;?br /> </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #0000ff">package</span><span style="color: #000000"> com.peidw.demo;<br /> <br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.FileNotFoundException;<br /> <br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.content.Context;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.sqlite.SQLiteDatabase;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.sqlite.SQLiteOpenHelper;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.sqlite.SQLiteDatabase.CursorFactory;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.util.Log;<br /> <br /> </span><span style="color: #008000">/**</span><span style="color: #008000"><br />  * 鏁?#37817;?#25652;撴搷浣?br />  * </span><span style="color: #808080">@author</span><span style="color: #008000"> peidw 2009-04-06<br />  *<br />  </span><span style="color: #008000">*/</span><span style="color: #000000"><br /> </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> DatabaseHelper </span><span style="color: #0000ff">extends</span><span style="color: #000000"> SQLiteOpenHelper{<br />     </span><span style="color: #0000ff">private</span><span style="color: #000000"> Context ctx </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br />     <br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> DatabaseHelper(Context context, String name, CursorFactory factory, </span><span style="color: #0000ff">int</span><span style="color: #000000"> version) {<br />         </span><span style="color: #0000ff">super</span><span style="color: #000000">(context, name, factory, version);<br /> <br />     }<br />     <br /> <br />     @Override<br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> onCreate(SQLiteDatabase arg0) {<br />         <br />     }<br />     @Override<br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> onUpgrade(SQLiteDatabase arg0, </span><span style="color: #0000ff">int</span><span style="color: #000000"> arg1, </span><span style="color: #0000ff">int</span><span style="color: #000000"> arg2) {<br />         <br />     }<br /> <br />     <br /> <br /> }<br /> </span></div> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #0000ff">package</span><span style="color: #000000"> com.peidw.demo;<br /> <br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.</span><span style="color: #000000">*</span><span style="color: #000000">;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.app.</span><span style="color: #000000">*</span><span style="color: #000000">;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.content.Context;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.Cursor;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.sqlite.SQLiteDatabase;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.sqlite.SQLiteOpenHelper;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.database.sqlite.SQLiteDatabase.CursorFactory;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.os.</span><span style="color: #000000">*</span><span style="color: #000000">;<br /> </span><span style="color: #0000ff">import</span><span style="color: #000000"> android.util.</span><span style="color: #000000">*</span><span style="color: #000000">;<br /> <br /> </span><span style="color: #008000">/**</span><span style="color: #008000"><br />  * ?#25655;浣?#37825;?#37817;?#25652;?#28186;?#28699;?br />  * </span><span style="color: #808080">@author</span><span style="color: #008000"> peidw 2009-04-19<br />  *<br />  </span><span style="color: #008000">*/</span><span style="color: #000000"><br /> </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> ConnectionProvider {<br />     <br />     </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000">  SQLiteDatabase db</span><span style="color: #000000">=</span><span style="color: #0000ff">null</span><span style="color: #000000">;<br />     <br />     <br />     </span><span style="color: #0000ff">public</span><span style="color: #000000">  ConnectionProvider(Context ctx) {<br />         </span><span style="color: #0000ff">if</span><span style="color: #000000"> (db</span><span style="color: #000000">==</span><span style="color: #0000ff">null</span><span style="color: #000000">){<br />             Log.v(</span><span style="color: #000000">"</span><span style="color: #000000">ConnectionProvider</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">ctx=</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">ctx.toString());<br />             DatabaseHelper dbHelper</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> DatabaseHelper(ctx,</span><span style="color: #000000">"</span><span style="color: #000000">StudDB</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #0000ff">null</span><span style="color: #000000">,</span><span style="color: #000000">1</span><span style="color: #000000">);<br />             db</span><span style="color: #000000">=</span><span style="color: #000000"> dbHelper.getWritableDatabase();<br />         }<br />     }<br />     <br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> SQLiteDatabase getConnection (){<br />         </span><span style="color: #0000ff">return</span><span style="color: #000000"> db;<br />     }<br />     <br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> closeConnection (){<br />         db.close();<br />     }<br />     </span><span style="color: #008000">/**</span><span style="color: #008000"><br />      * 鍒?#37826;?#29723;?#37828;?#37722;?#28699;樺湪<br />      * </span><span style="color: #808080">@param</span><span style="color: #008000"> tablename<br />      * </span><span style="color: #808080">@return</span><span style="color: #008000"><br />      </span><span style="color: #008000">*/</span><span style="color: #000000"><br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> isTableExits(String tablename){<br />         </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> result</span><span style="color: #000000">=</span><span style="color: #0000ff">false</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">琛?#32448;?#28051;嶅瓨?#28266;</span><span style="color: #008000"><br /> </span><span style="color: #000000">        String str</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">select count(*) xcount  from sqlite_master where table='</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">tablename</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">'</span><span style="color: #000000">"</span><span style="color: #000000">;<br />         Cursor c </span><span style="color: #000000">=</span><span style="color: #000000"> db.rawQuery(str,</span><span style="color: #0000ff">null</span><span style="color: #000000">);<br />         </span><span style="color: #0000ff">int</span><span style="color: #000000"> xcount</span><span style="color: #000000">=</span><span style="color: #000000">c.getColumnIndex(</span><span style="color: #000000">"</span><span style="color: #000000">xcount</span><span style="color: #000000">"</span><span style="color: #000000">);<br />         </span><span style="color: #0000ff">if</span><span style="color: #000000">(xcount</span><span style="color: #000000">!=</span><span style="color: #000000">0</span><span style="color: #000000">){<br />             result</span><span style="color: #000000">=</span><span style="color: #0000ff">true</span><span style="color: #000000">; </span><span style="color: #008000">//</span><span style="color: #008000">琛?#28699;樺湪</span><span style="color: #008000"><br /> </span><span style="color: #000000">        }<br />         </span><span style="color: #0000ff">return</span><span style="color: #000000"> result;<br />     }<br /> }<br /> </span></div> <br /> ?#28266;绋嬪簭涓搷浣?#37825;版墍鐨勪唬鐮佺?#22248;<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #000000"><br />  ConnectionProvider cp</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> ConnectionProvider(</span><span style="color: #0000ff">this</span><span style="color: #000000">.getBaseContext());<br />         </span><span style="color: #008000">//</span><span style="color: #008000"> if(cp.isTableExits(TABLE_NAME)){</span><span style="color: #008000">//</span><span style="color: #008000">琛ㄥ凡瀛樺湪</span><span style="color: #008000"><br /> </span><span style="color: #000000">             createTable(cp);<br />             queryTable(cp);<br />         </span><span style="color: #008000">//</span><span style="color: #008000"> }else{</span><span style="color: #008000">//</span><span style="color: #008000">琛?#28051;嶅瓨?#28266;<br />         </span><span style="color: #008000">//</span><span style="color: #008000">     createTable();<br />         </span><span style="color: #008000">//</span><span style="color: #008000"> }</span><span style="color: #008000"><br /> </span><span style="color: #000000"><br /> <br /> <br /> </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> createTable( ConnectionProvider cp){<br />         <br /> <br />         SQLiteDatabase db</span><span style="color: #000000">=</span><span style="color: #000000"> cp.getConnection();<br />         db.execSQL(</span><span style="color: #000000">"</span><span style="color: #000000">CREATE TABLE IF NOT EXISTS </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> TABLE_NAME </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> (</span><span style="color: #000000">"</span><span style="color: #000000"><br />                 </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">stud_no</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> TEXT,</span><span style="color: #000000">"</span><span style="color: #000000"><br />                 </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">stud_name</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> TEXT</span><span style="color: #000000">"</span><span style="color: #000000"><br />                 </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">);</span><span style="color: #000000">"</span><span style="color: #000000">);<br />     <br />         String sql_1 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">insert into </span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000"> TABLE_NAME </span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000"> (stud_no, stud_name) values('S777', 'Lily Chang');</span><span style="color: #000000">"</span><span style="color: #000000">;<br />         String sql_2 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">insert into </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> TABLE_NAME </span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000"> (stud_no, stud_name) values('S888', 'Linda Lin');</span><span style="color: #000000">"</span><span style="color: #000000">;<br />         String sql_3 </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">insert into </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> TABLE_NAME </span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000"> (stud_no, stud_name) values('S999', 'Bruce Wang');</span><span style="color: #000000">"</span><span style="color: #000000">;<br />         db.execSQL(sql_1); db.execSQL(sql_2); db.execSQL(sql_3);<br />     }<br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> queryTable(ConnectionProvider cp){<br />         String str</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">select * from </span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">TABLE_NAME;<br />         Cursor c </span><span style="color: #000000">=</span><span style="color: #000000">cp.getConnection().rawQuery(str,</span><span style="color: #0000ff">null</span><span style="color: #000000">);<br />         Log.v(</span><span style="color: #000000">"</span><span style="color: #000000">loginactive</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">鏌?#29831;?#29825;板綍</span><span style="color: #000000">"</span><span style="color: #000000">);<br />         Log.v(</span><span style="color: #000000">"</span><span style="color: #000000">loginactive</span><span style="color: #000000">"</span><span style="color: #000000">,String.valueOf(c.getCount()) );<br />         </span><span style="color: #0000ff">if</span><span style="color: #000000">(c</span><span style="color: #000000">!=</span><span style="color: #0000ff">null</span><span style="color: #000000">){<br />             c.moveToFirst();<br />             </span><span style="color: #0000ff">while</span><span style="color: #000000">(</span><span style="color: #000000">!</span><span style="color: #000000">c.isLast()){<br />                 Log.v(</span><span style="color: #000000">"</span><span style="color: #000000">loginactive</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">outp<img alt="" src="http://www.5432034.com/Images/dot.gif" />.</span><span style="color: #000000">"</span><span style="color: #000000">);<br />                 String stud_no</span><span style="color: #000000">=</span><span style="color: #000000">c.getString(</span><span style="color: #000000">0</span><span style="color: #000000">);<br />                 String stud_name</span><span style="color: #000000">=</span><span style="color: #000000">c.getString(</span><span style="color: #000000">1</span><span style="color: #000000">);<br />                 System.out.println(stud_no</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">---------------</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">stud_name);<br />                 Log.v(</span><span style="color: #000000">"</span><span style="color: #000000">loginactive</span><span style="color: #000000">"</span><span style="color: #000000">,stud_no</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">---------------</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">stud_name);<br />                 c.moveToNext();<br />             }<br />         }<br /> <br />     }</span></div> ?#22831;鐑?#29999;?#37719;曞嚮涓娆?#39582;垮憡浜??#32018;?#32018;?#32018; <br /> <script type="text/javascript"><!-- branchr_client_id = 'i5x9suaaicn0eb41ts2q2823gn'; branchr_ad_width = 468; branchr_ad_height = 60; branchr_ad_format = 11; //--></script> <script type="text/javascript" src="http://static.branchr.com/serve.js?1248290004"></script><br /><img src ="http://www.5432034.com/pdw2009/aggbug/266460.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.5432034.com/pdw2009/" target="_blank">鏈夌尗鐩镐即鐨?#37827;?#28699;?/a> 2009-04-19 22:20 <a href="http://www.5432034.com/pdw2009/archive/2009/04/19/266460.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Android甯冨眬(Layout)http://www.5432034.com/pdw2009/archive/2009/04/15/265850.html鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author>Wed, 15 Apr 2009 13:53:00 GMThttp://www.5432034.com/pdw2009/archive/2009/04/15/265850.htmlhttp://www.5432034.com/pdw2009/comments/265850.htmlhttp://www.5432034.com/pdw2009/archive/2009/04/15/265850.html#Feedback0http://www.5432034.com/pdw2009/comments/commentRss/265850.htmlhttp://www.5432034.com/pdw2009/services/trackbacks/265850.html <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
鑺傜?#36891;綔涓?#23534;澶?#37510;?#28051;涓?#29999;冨眬瀹?#37731;ㄩ噷鍙?#28000;ュ寘鎷?鎴?#28598;?#28051;?#29999;冨眬瀹?#37731;?#37510;侺inearLayout绾挎?#37928;?#29999;冨眬鏂?#23534;?#38171;岃涔?#28051;?#28051;?#38171;岃涔堝乏鍙?#37928;勬坊鍔犳帶?#27426;锛屽緢甯哥敤


      AbsoluteLayout鍙?#28000;?#29825;?#28699;?#37711;冪?#29363;寚瀹?#37713;?#32429;?#37928;剎/y鍧?#37837;囧?#38171;?#39582;?#37828;?#32448;哄湪灞?#39582;?#28051;?#37510;?0, 0)涓哄乏涓?#29785;?#38171;屽綋鍚?#28051;?#37812;?#37722;?#37721;崇Щ鍔?#37827;?#38171;屽潗鏍囧?#28751;?#37721;?#28598;?#37510;侫bsoluteLayout娌?#37832;?#26916;?#26440;?#22935;?#38171;?#37711;?#29825;?#37711;冪礌涔嬮棿浜?#37929;?#38322;嶅彔锛堝敖绠?#28051;?#37818;ㄨ崘锛?#37510;傛垜浠?#38315;?#29999;?#28051;?#37818;ㄨ崘浣跨敤AbsoluteLayout锛岄櫎闈?#28003;犳湁姝e綋?#24714;鐢?#29781;?#28003;跨敤瀹?#38171;?#37733;?#28051;哄畠浣?#37923;岄潰浠g爜澶?#26473;?#37714;氭?#38171;屼互?#22182;浜庡湪涓嶅悓鐨勮澶?#28051;?#37721;兘涓嶈兘寰堝ソ鍦板伐浣?#37510;?nbsp;


     RelativeLayout鍏?#29825;?#28699;?#37711;冪?#29363;寚瀹?#28000;?#28000;?#37929;?#28725;逛?#24225;叾瀹?#37711;冪?#29363;?#26667;埗鍏冪礌鐨?#28003;嶇疆锛?#38315;?#26473;嘔D鎸?#28729;?#38171;?#37510;?#37733;犳锛屼綘鍙?#28000;?#28000;?#37721;?#28725;?#27067;?#38171;屾垨涓?#28051;?#38171;屾垨缃?#27996;庡睆骞?#28051;?#28598;?#37928;勫舰寮?#37833;?#37818;?#37714;?#28051;?#28051;?#37711;冪礌銆?#37711;冪?#29363;寜椤哄簭鎺?#37714;?#38171;?#37733;犳濡傛灉绗?#28051;涓?#37711;冪礌?#28266;灞?#39582;?#37928;?#28051;?#28598;?#38171;岄偅涔?#37929;?#28725;逛簬杩?#28051;?#37711;冪礌鐨?#37711;?#28729;?#37711;冪礌灏?#28000;?#28766;?#39582;?#28051;?#28598;?#37928;?#37929;?#28725;逛?#23943;疆鏉?#37818;?#37714;?#37510;?#28641;傛灉浣跨敤XML鏉?#37816;?#28729;?#26473;?#28051;猯ayout锛屽湪?#32152;瀹?#28052;?#28729;?#28052;嬪墠锛岃鍏宠仈鐨?#37711;冪礌蹇呴』瀹?#28052;?#37510;?
杩?#37828;?#28051;涓?#29825;?#37825;?#37731;?#37928;?#28186;?#28699;?#37510;?br />
  FrameLayout鏄?#37832;绠鍗?#37928;?#28051;涓?#29999;冨眬瀵硅薄銆?#28729;?#29722;?#28729;?#37714;?#28051;轰綘灞?#39582;?#28051;?#37928;?#28051;涓?#34425;櫧澶囩敤鍖哄煙锛屼?#23338;悗?#32152;鍙?#28000;ュ湪鍏?#28051;?#28617;?#37711;?#28051;涓?#37719;?#28051;瀵硅薄 鈥?姣?#28641;?#38171;?#28051;寮犱綘瑕?#37721;?#29999;?#37928;?#37733;?#37911;?#37510;傛墍鏈夌殑瀛?#37711;冪礌灏嗕細鍥哄畾?#28266;灞?#39582;?#37928;勫乏涓?#29785;?#38171;涗綘涓嶈兘涓篎rameLayout涓?#37928;?#28051;涓?#28699;?#37711;冪?#29363;寚瀹?#28051;涓?#28003;嶇疆銆?#37722;?#28051;涓?#28699;?#37711;冪礌灏嗕細鐩存帴?#28266;鍓?#28051;涓?#28699;?#37711;冪礌涔?#28051;?#26473;?#29723;岃鐩栧~鍏?#38171;屾妸瀹?#28000;?#38318;?#28000;芥垨鍏?#38318;?#37816;?#28003;?#38171;堥櫎闈炲悗涓涓?#28699;?#37711;冪?#29363;槸閫?#37828;?#37928;?#38171;?#37510;?

http://blog.chinaunix.net/u2/86463/showart_1674836.html




]]>
Android瀹炵幇涓嶅悓Active椤?#38344;㈤棿鐨勮?#23456;浆http://www.5432034.com/pdw2009/archive/2009/04/13/265195.html鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author>Sun, 12 Apr 2009 16:40:00 GMThttp://www.5432034.com/pdw2009/archive/2009/04/13/265195.htmlhttp://www.5432034.com/pdw2009/comments/265195.htmlhttp://www.5432034.com/pdw2009/archive/2009/04/13/265195.html#Feedback1http://www.5432034.com/pdw2009/comments/commentRss/265195.htmlhttp://www.5432034.com/pdw2009/services/trackbacks/265195.html              intent.setClass(ErrorPageActive.this, LoginActive.class);   
             startActivity(intent);  

灏?#26473;?#28052;?#32480;鍗?#38171;?#28641;傛灉瑕?#37814;?#28051;涓?#26916;?#38344;?#37928;?#37721;傛暟甯?#37714;?#37721;?#28051;涓?#26916;?#38344;?#38171;?#37714;欓渶瑕?br />  Bundle bundle = new Bundle();   
 bundle.putString("USERNAME", et_username.getText().toString());   
intent.putExtras(bundle);

閫?#26473;囦互涓?#28051;?#29723;屼唬鐮佺?#26495;疄锛?#29999;?#37721;傛暟璺宠浆銆?

]]>
Android搴旂敤绋嬪簭鍥?#28598;?#32513;勪欢http://www.5432034.com/pdw2009/archive/2009/04/13/265193.html鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author>Sun, 12 Apr 2009 16:04:00 GMThttp://www.5432034.com/pdw2009/archive/2009/04/13/265193.htmlhttp://www.5432034.com/pdw2009/comments/265193.htmlhttp://www.5432034.com/pdw2009/archive/2009/04/13/265193.html#Feedback2http://www.5432034.com/pdw2009/comments/commentRss/265193.htmlhttp://www.5432034.com/pdw2009/services/trackbacks/265193.html瀵逛簬涓涓狝ndroid搴旂敤绋嬪簭鏉?#29831;?#38171;屾槸鐢?#37733;?#32457;嶆瀯閫?#37735;?#32513;?#32513;?#38000;屾垚鐨?#38171;?#26473;?#37733;?#32457;嶆瀯閫?#37735;?#28641;?#28051;?#38171;?/span>

    Activity

    Intent Receiver

    Service

    Content Provider


  浣?#37828;?#38171;?#39582;?#28051;?#37828;?#23011;?#28051;涓狝ndroid搴旂敤绋嬪簭?#20824;?#28214;瑕?#26473;?#37733;?#32457;嶆瀯閫?#37735;?#38171;?#26473;?#28051;?#37828;?#36423;呴』鐨?#38171;屾煇浜?#37827;?#37706;?#38171;屾垜浠?#37721;渶瑕?#26473;?#37733;?#32457;?#28051;?#37928;?#37713;犵?#23943;?#21227;悎鎴?#37812;?#28000;?#37928;?#25652;旂敤銆?

    褰撴垜浠?#37828;庣‘浜?#37812;?#28000;?#37928;?#25652;旂敤?#28214;瑕佸摢浜?#37835;?#38315;?#37735;楀悗锛屾垜浠?#28751;遍渶瑕佸湪AndroidManifest.xml涓?#37927;?#29825;?#26473;?#27996;?#37835;?#38315;?#37735;?#37928;勬竻鍗?#37510;?#26473;?#37828;?#28051;涓猉ML閰嶇疆?#26499;?#27426;锛?#26473;?#28051;?#38320;嶇疆?#26499;?#27426;?#25956;浜庡畾涔?#37812;?#28000;?#37928;?#25652;旂敤绋嬪簭鐨?#32513;勪欢銆佺?#21226;欢鐨?#37716;熻兘鍙?#36423;?#29781;?#37833;′欢?#29905;銆?#26473;?#28051;?#38320;嶇疆?#26499;?#27426;鏄?#23011;?#28051;狝ndroid搴旂敤蹇呴渶鐨?#37510;?#28725;逛簬AndroidMainfest.xml鐨凷chema锛?#37721;傝僑DK鍖呴檮甯?#37928;勬枃妗?#37510;?#28000;?#28051;?#38171;屾垜浠?#28725;?#37733;?#32457;嶆瀯閫?#37735;?#37707;?#28051;浜?#29831;存槑锛?/span>

涓銆丄ctivity

    Activity鏄疉ndroid鏋?#38315;?#37735;?#28051;?#37832;鍩?#37832;?#37928;?#28051;绉?#38171;屽湪搴旂敤涓?#38171;?#28051;涓猘ctivity閫?#29999;稿氨鏄?#28051;涓?#37719;曠嫭鐨勫睆骞?#37510;傛瘡涓涓猘ctivity?#20824;琚?#28729;炵幇涓?#28051;涓?#37913;?#32468;?#37928;?#32491;?#38171;?#39582;?#28051;旂户?#22745;浜嶢ctivity杩?#28051;?#37737;?#32491;?#37510;?#26473;?#28051;猘ctivity绫?#28751;嗕細鏄?#32448;?#37922;?#37713;?#28051;猇iews?#24118;?#27426;缁勬垚鐨勭敤鎴?#37818;?#37721;?#38171;?#39582;?#28725;逛?#23337;欢鍋?#37713;哄?#23941;簲銆?#28598;?#38318;?#28000;?#37928;?#25652;旂敤?#20824;浼氬寘鍚?#28598;?#28051;?#37928;勫睆骞?#37510;?#28186;?#28641;?#38171;?#28051;涓煭?#31223;鎭?#25652;旂敤绋嬪簭灏嗕細鏈?#28051;涓?#28766;?#39582;曠敤浜?#37828;?#32448;鸿?#26050;郴浜?#37714;?#29723;?#38171;?#32471;?#27996;?#28051;?#28766;?#39582;曠敤浜庡啓?#29037;?#31223;鎭?#38171;屽?#23678;椂杩樹細鏈夌敤浜庢祻瑙?#37827;х煭?#31223;鎭?#37721;?#26473;?#29723;?#32495;?#32513;?#29825;?#32515;?#37928;勫睆骞?#37510;傛瘡涓涓?#26473;?#37837;?#37928;勫睆骞?#38171;屽氨鏄?#28051;涓猘ctivity銆?#28000;?#28051;涓?#28766;?#39582;?#28725;?#38008;?#37714;?#37721;?#28051;涓?#28766;?#39582;?#37828;?#23536;?#32480;鍗?#37928;?#37510;傚湪涓浜?#25652;旂敤涓?#38171;?#28051;涓?#28766;?#39582;?#37922;氳嚦浼?#26473;?#37733;炲?#32513;?#37715;?#28051;涓?#28766;?#39582;?#37510;?/span>

    ?#32139;涓涓柊鐨勫睆骞曟墦寮鍚?#38171;屽墠涓涓?#28766;?#39582;曞?#21973;?#27693;殏鍋?#38171;?#39582;朵繚瀛樺湪鍘?#37721;插爢鏍?#28051;?#37510;傜敤鎴?#37721;?#28000;?#26473;?#37733;?#37714;板巻鍙插爢鏍?#28051;?#37928;?#37715;?#28051;涓?#28766;?#39582;?#37510;傚綋灞?#39582;?#28051;嶅啀浣跨敤鏃?#38171;?#26473;?#37721;?#28000;?#28000;庡巻鍙插爢鏍?#28051;?#37714;犻櫎銆傞粯璁ゆ儏鍐?#28051;?#38171;孉ndroid灏嗕?#27691;繚鐣?#28000;?#28051;?#28766;?#39582;?#37714;版瘡涓涓?#25652;旂敤鐨?#26473;?#29723;屽睆骞?#37510;?/span>

    Android浣跨敤浜咺ntent杩?#28051;壒娈?#32491;?#38171;?#28729;炵?#26495;湪灞?#39582;?#28051;庡睆骞?#28052;嬮棿绉?#37716;?#37510;侷ntent绫荤敤浜?#37819;?#26473;?#28051;涓?#25652;旂敤灏嗕細鍋?#28000;涔?#27996;?#37510;傚湪Intent鐨勬弿杩?#32513;撴瀯涓?#38171;?#37832;?#28051;?#28051;?#37832;閲?#29781;?#37928;?#38318;?#37714;?#38171;?#37716;?#28003;?#37724;?#37716;?#28003;?#28725;?#25652;?#37928;勬暟鎹?#37510;?#37711;稿瀷鐨?#37716;?#28003;?#32491;诲瀷鏈?#38171;歁AIN锛坅ctivity鐨勯棬鎴?#38171;?#37510;乂IEW銆丳ICK銆丒DIT?#29905;銆傝?#37716;?#28003;?#28725;?#25652;?#37928;勬暟鎹?#37714;?#28000;RI鐨勫舰寮?#26473;?#29723;岃〃绀?#37510;?#28186;?#28641;?#38171;氳鏌?#37930;?#28051;涓?#27996;?#37928;勮?#26050;郴鏂?#23534;?#38171;屼綘?#28214;瑕?#37714;?#23524;?#28051;涓?#37716;?#28003;?#32491;诲瀷涓篤IEW鐨刬ntent锛屼互鍙?#28051;涓?#29723;?#32448;?#26473;?#28051;?#27996;?#37928;刄RI銆?/span>

    涓?#28052;?#37832;?#37711;崇郴鐨?#28051;涓?#32491;?#37721;獻ntentFilter銆?#37929;?#28725;逛簬intent鏄?#28051;涓?#37832;?#37825;?#37928;?#37707;?#37836;?#27996;?#37928;?#29831;锋眰锛?#28051;涓猧ntent filter鍒欑敤浜?#37819;?#26473;?#28051;涓猘ctivity锛?#37812;?#38000;匢ntent Receiver锛夎兘澶熸搷浣滃摢浜沬ntent銆?#28051;涓猘ctivity濡傛灉瑕?#37828;?#32448;?#28051;涓?#27996;?#37928;勮?#26050;郴鏂?#23534;?#37827;?#38171;岄渶瑕佸0鏄?#28051;涓狪ntentFilter锛?#26473;?#28051;狪ntentFilter瑕佺煡閬撴?#28052;堝幓澶勭悊VIEW鍔?#28003;?#37724;岃〃绀?#28051;涓?#27996;?#37928;刄RI銆侷ntentFilter?#28214;瑕佸湪AndroidManifest.xml涓?#28729;?#28052;?#37510;?/span>

   閫?#26473;?#29785;f瀽鍚勭intent锛屼粠涓涓?#28766;?#39582;?#28725;?#38008;?#37714;?#37721;?#28051;涓?#28766;?#39582;?#37828;?#23536;?#32480;鍗?#37928;?#37510;傚綋鍚?#37715;嶅鑸?#37827;?#38171;宎ctivity灏嗕細璋冪敤startActivity(Intent myIntent)鏂?#23049;?#37510;傜劧鍚?#38171;?#32495;?#32513;?#28028;氬湪?#22669;鏈?#28729;?#29761;?#37928;?#25652;旂敤绋嬪簭涓?#28729;?#28052;夌殑IntentFilter涓?#37836;?#37813;?#38171;屾壘鍒?#37832;鍖?#38320;峬yIntent鐨処ntent瀵?#25652;?#37928;刟ctivity銆傛柊鐨刟ctivity鎺?#37824;?#37714;癿yIntent鐨?#38315;氱煡鍚?#38171;?#23534;濮?#26473;?#29723;?#37510;傚綋startActivity鏂?#23049;?#29722;?#29835;冪敤灏嗚Е鍙戣В?#28733;myIntent鐨?#37716;?#28003;?#38171;?#26473;?#28051;?#37832;?#37714;舵彁渚?#27996;?#28051;?#28051;?#37711;?#38335;ソ澶?#38171;?/span>

    A銆丄ctivities?#20824;澶?#38322;嶅鍒╃敤浠庡叾瀹?#32513;勪欢涓?#28000;ntent鐨勫舰寮?#27996;?#37922;?#37928;?#28051;涓?#29831;锋眰锛?/span>

    B銆丄ctivities鍙?#28000;ュ湪浠?#28003;?#37827;?#37706;?#29722;?#28051;涓?#37711;?#37832;夌?#31295;悓IntentFilter鐨勬柊鐨凙ctivity鍙?#28000;?#37510;?/span>

浜?#37510;両ntent Receiver

    褰撲綘甯?#37832;涗綘鐨?#25652;旂敤?#20824;澶?#28725;?#28051;涓?#28598;?#38318;?#37928;?#27996;嬩欢锛?#28641;傚綋鐢?#29831;?#37723;?#37711;?#37827;?#38171;屾垨鑰?#37825;?#37817;綉缁?#37721;敤鏃?#38171;屾垨鑰?#37714;?#27996;嗘櫄涓?#37827;?#38171;?#37707;?#37713;哄?#23941;簲锛屼綘鍙?#28000;?#28003;跨敤涓涓狪ntent Receiver銆傝櫧?#21159;Intent Receiver?#28266;?#21125;鍏磋叮鐨?#27996;嬩欢鍙?#37922;?#37827;?#38171;屼細浣跨敤NotificationManager閫氱煡?#25956;鎴?#38171;屼絾瀹?#39582;?#28051;嶈兘鐢熸垚涓涓猆I銆侷ntent Receiver?#28266;AndroidManifest.xml涓?#23049;?#37712;?#38171;屼絾涔?#37721;?#28000;ュ湪浠g爜涓?#28003;跨敤Context.registerReceiver()杩?#29723;屾敞鍐?#37510;傚綋涓涓猧ntent receiver琚?#29785;?#37721;戞椂锛屼綘鐨?#25652;旂敤涓嶅繀瀵?#29831;锋眰璋冪敤intent receiver锛?#32495;?#32513;?#28028;氬湪?#28214;瑕?#37928;?#37827;?#37706;欏惎鍔ㄤ綘鐨?#25652;旂敤銆?#37722;勭?#23941;簲?#25956;杩?#37721;?#28000;?#38315;?#26473;?#28003;跨敤Context.broadcastIntent()灏?#28729;?#28000;?#38007;?#23480;?#37928;刬ntent receiver骞挎挱缁?#37711;?#28729;?#25652;旂敤绋嬪簭銆?/span>

涓?#37510;丼ervice

    涓涓猄ervice鏄?#28051;娈甸暱鐢?#37723;?#37723;?#37832;?#37928;?#38171;屾病鏈夌敤鎴?#37923;岄潰鐨勭?#23338;簭銆傛?#26055;?#20904;ソ鐨?#28051;涓?#28186;?#28699;?#28751;?#37828;?#28051;涓?#23005;e湪浠庢挱鏀?#37714;?#29723;?#28051;挱鏀?#23005;?#37831;?#37928;勫獟浣撴挱鏀?#37731;?#37510;傚湪涓涓?#28655;?#28003;撴挱鏀?#37731;?#37928;?#25652;旂敤涓?#38171;?#25652;?#29831;?#28028;?#37832;?#28598;?#28051;猘ctivity锛岃浣跨敤鑰?#37721;?#28000;?#38315;?#37815;?#23005;?#37831;?#39582;舵挱鏀?#23005;?#37831;?#37510;傜劧鑰?#38171;岄煶涔?#38322;?#37824;?#26473;?#28051;?#37716;熻兘骞舵病鏈?#28725;?#25652;?#37928;刟ctivity锛?#37733;?#28051;?#28003;跨敤鑰呭綋鐒朵?#27699;涓哄湪瀵?#38008;?#37714;?#37711;?#28729;冨睆骞?#37827;?#38346;?#28052;?#25652;?#29831;?#26473;樺湪?#25393;鏀?#37928;?#37510;傚湪杩?#28051;?#28186;?#28699;?#28051;?#38171;屽獟浣撴挱鏀?#37731;?#26473;?#28051;猘ctivity浼?#28003;跨敤Context.startService()鏉ュ惎鍔?#28051;涓猻ervice锛屼?#24228;?#37721;?#28000;ュ湪鍚庡?#39041;繚?#23508;闊?#28052;?#37928;勬挱鏀?#37510;?#37722;屾椂锛?#32495;?#32513;?#28052;?#28751;嗕繚?#23508;杩?#28051;猻ervice涓鐩存墽琛?#38171;?#37929;?#37714;?#26473;?#28051;猻ervice杩?#29723;?#32513;?#37833;?#37510;?#37721;?#28598;?#38171;屾垜浠?#26473;?#37721;?#28000;?#38315;?#26473;?#28003;跨敤Context.bindService()鏂?#23049;?#38171;?#26473;?#37818;?#37714;?#28051;涓猻ervice涓?#38171;?#28641;傛灉杩?#28051;猻ervice杩樻病鏈?#26473;?#29723;屽皢?#24782;鍔?#28729;?#38171;?#37510;傚綋杩?#37818;?#37714;?#28051;涓猻ervice涔嬪悗锛屾垜浠?#26473;?#37721;?#28000;ervice鎻?#28186;?#37928;勬帴鍙?#28051;庡畠杩?#29723;岄氳銆傛?#22446;獟浣撴挱鏀?#37731;?#26473;?#28051;?#28186;?#28699;?#37833;?#29831;?#38171;屾垜浠?#26473;?#37721;?#28000;?#26473;?#29723;屾殏鍋?#37510;?#38322;嶆挱绛夋搷浣?#37510;?/span>

鍥?#37510;丆ontent Provider

    搴旂敤绋嬪簭?#20824;澶?#28751;?#28729;?#28000;?#37928;勬暟鎹繚瀛?#37714;版枃?#27426;涓?#37510;丼QL鏁?#37817;?#25652;?#28051;?#38171;?#37922;氳嚦鏄?#28000;?#28003;?#37832;?#37825;?#37928;勮澶?#28051;?#37510;傚綋浣犳兂灏嗕綘鐨?#25652;旂敤鏁?#37817;?#28051;庡叾瀹?#37928;?#25652;旂敤鍏?#27996;?#37827;?#38171;孋ontent Provider灏嗕細寰?#37832;夌敤銆?#28051;涓狢ontent Provider绫?#28729;炵幇浜?#28051;缁勬爣鍑?#37928;勬柟娉?#38171;屼?#24228;岃兘澶?#29825;?#37711;?#28729;?#37928;?#25652;旂敤?#32346;瀛樻垨璇?#37721;栨Content Provider澶勭悊鐨勫?#21229;鏁?#37817;?#32491;诲瀷銆?/span>

    鏇?#29831;?#32513;?#37928;凜ontent Provider璧勬枡锛?#37721;?#28000;?#37721;傝?#38340;?#29999;︽枃妗?#28051;?#37928;凙ccessing Content Providers銆?br />
浜?#37510;両ntent绫?br />     Intent璐熻矗瀵?#25652;旂敤涓?#28051;娆℃搷浣?#37928;?#37716;?#28003;?#37510;?#37716;?#28003;?#23057;?#37721;?#37825;?#37817;?#37510;?#38340;?#37716;犳暟鎹?#26473;?#29723;屾弿杩?#38171;孉ndroid鍒?#37837;?#37817;?#23005;ntent鐨勬弿杩?#38171;岃?#29115;矗鎵?#37714;?#28725;?#25652;?#37928;?#32513;勪欢锛屽皢 Intent浼?#38315;?#32513;?#29835;冪敤鐨?#32513;勪欢锛?#39582;?#28729;屾垚缁勪欢鐨?#29835;冪敤銆?#37733;犳锛孖ntent?#28266;杩?#38322;岃?#39118;潃涓涓?#28655;?#28003;?#28051;?#28000;?#37928;?#28003;滅敤锛?#28051;撻棬鎻?#28186;?#32513;勪欢浜?#37929;?#29835;冪敤鐨?#37929;?#37711;充俊鎭?#38171;?#28729;炵幇璋冪敤鑰?#28051;庤璋??#25956;鑰?#28052;嬮棿鐨勮В鑰?#37510;?br />



]]>
璁﹖omcat鏀寔ssi http://www.5432034.com/pdw2009/archive/2009/03/06/258270.html鏈夌尗鐩镐即鐨?#37827;?#28699;?/dc:creator>鏈夌尗鐩镐即鐨?#37827;?#28699;?/author>Fri, 06 Mar 2009 09:24:00 GMThttp://www.5432034.com/pdw2009/archive/2009/03/06/258270.htmlhttp://www.5432034.com/pdw2009/comments/258270.htmlhttp://www.5432034.com/pdw2009/archive/2009/03/06/258270.html#Feedback0http://www.5432034.com/pdw2009/comments/commentRss/258270.htmlhttp://www.5432034.com/pdw2009/services/trackbacks/258270.html1.鎶婃枃?#27426;$CATALINA_HOME/server/lib/servlets-ssi.renametojar閲嶆柊鍛?#37722;?#28051;?CATALINA_HOME/server/lib/servlets-ssi.jar.

2.?#28266;?#26499;?#27426;$CATALINA_HOME/conf/web.xml涓?#38171;屼綘?#28214;瑕?#37814;?#28051;?#28051;?#37734;?#37826;?#37928;勬敞閲婂?#32472;帀锛宻ervlet 澹?#37828;庡?#23483;ervlet mapping銆?servlet 澹?#37828;庣?#23341;捣鏉?#32491;讳技浜?#28051;?#38344;?#38171;?

<servlet>
<servlet-name>ssi</servlet-name>
...
</servlet>


鑰宻ervlet mapping鐪嬭捣鏉?#32491;讳技浜?#28051;?#38344;?#38171;?

<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>


杩?#27996;泂ervlet 澹?#37828;庡?#23470;apping鍙?#28000;?#27996;?#37831;垮湴鍔?#37711;?#37714;颁綘鐨刉eb 搴旂敤绋嬪簭閮?#32515;叉弿杩?#32471;?#28051;?#37510;?br />
SSI鍩?#37832;?#37816;囦护

        1銆?span class="hilite2">SSI鎸囦护鐨?#29831;?#23049;?#37837;?#23534;?#28641;?#28051;?#38171;?
            <!--#element [attribute=value] [attribute=value] ... -->
               杩?#27996;?#37816;囦护浠TML娉?#38322;?#37928;勫舰寮?#37713;虹幇锛屾墍浠?#28641;傛灉浣犳病鏈夋纭?#29825;?#32515;?span class="hilite2">SSI锛屾祻瑙?#37731;?#28028;?#36423;?#37923;?#26473;?#27996;?#37816;囦护銆?#28641;傛灉浣犳纭?#29825;?#32515;?#27996;?span class="hilite2">SSI锛?#26473;?#27996;?#37816;囦护浼氳鐩?#25652;?#37928;?#32513;撴灉鏇?#37817;?#37510;?
        2銆乧onfig
            <!--#config timefmt="%B %Y" -->
            config?#25956;鏉?#37816;?#28729;?#26473;?#37733;?#32513;?#28729;?#37812;?#32468;?#23092;?#29785;?#37731;?#37928;勯敊璇?#28103;?#37805;?#37510;?#37827;?#37832;?#37724;屾枃?#27426;澶?#28751;?#37928;勬牸寮?#37510;?
         甯哥敤鎸囦护锛?
            <!--#config errmsg="鑷?#28729;?#28052;?#38335;?#29831;?#28103;?#37805;?-->
            <!--#config sizefmt="鏄?#32448;哄崟浣?-->
            <!--#config timefmt="鏄?#32448;?#37837;?#23534;?-->
         鍙傛暟锛?
             errmsg 鑷?#28729;?#28052;?span class="hilite2">SSI鎵?#29723;岄敊璇?#28103;?#37805;?#38171;?#37721;?#28000;?#28051;?#28000;?#28003;曚綘?#26537;娆?#37928;勬柟寮?#37510;?
             sizefmt ?#26499;?#27426;澶?#28751;?#37828;?#32448;?#37826;?#23534;?#38171;岄粯璁?#28051;?#28699;?#38010;傛柟寮?"bytes")鍙?#28000;?#37824;?#28051;哄崈瀛?#38010;傛柟寮?"abbrev")
             timefmt 鏃?#38338;存樉绀?#37826;?#23534;?#38171;?#37832;?#20242;娲?#37928;勯?#23943;疆灞炴?#37510;?
         Eg:
             <!--#config errmsg="鏈?#37716;?#37731;?#37813;?#29723;岄敊璇?#38171;?#29831;疯?#26050;?#33636;?#24714;鍛?yiho@126.com锛岃阿?#38463;?#32018;"-->
             <!--#fsize file="涓嶅瓨?#28266;鐨勬枃?#27426;.htm"-->

             浠?#37719;?#28699;?#38010;傛柟寮?#37828;?#32448;烘枃?#27426;澶?#28751;?
             <!--#config sizefmt="abbrev"-->
             <!--#fsizefile="news.htm"-->
            浠ョ壒瀹?#37928;?#37827;?#38338;存牸寮?#37828;?#32448;?#37827;堕棿
    <!--#config timefmt="%Y骞?%m鏈?d鏃?鏄?#37832;?W 鍖?#27996;?#37827;堕棿%H:%M:%s锛?Y骞村凡杩囧幓浜?j澶?浠?#28598;?#37828;?Y骞?#37928;?#32471;?U涓?#37828;?#37832;?-->
    <!--#echo var="DATE_LOCAL"--> 鏄?#32448;?#28000;?#28598;?#37828;?#37828;?#37832;?#37713;?鍑犳湀,鏃跺尯
    <!--#config timefmt="浠?#28598;?A, %B ,鏈?#37716;?#37731;?#37827;跺尯鏄?%z锛屾槸"-->
    <!--#echo var="DATE_LOCAL"-->   
3銆乪cho
    echo?#25956;鏉?#26440;?#37713;?#37721;橀噺鐨勫?#37510;?
     <!--#echo var="VARIABLE_NAME" -->
     <!--#echo var="鍙橀噺鍚嶇О"-->
    鏈枃妗?#37722;嶇О锛?#32459;嬪簭浠g爜:
     <!--#echo var="DOCUMENT_NAME"-->
    鐜板湪鏃堕棿锛?#32459;嬪簭浠g爜:
     <!--#echo var="DATE_LOCAL"-->
    ?#32152;鐨処P鍦板潃鏄?#32459;嬪簭浠g爜:
     <!--#echo var="REMOTE_ADDR"-->
4銆乪xec
   <!--#exec cmd="COMMOND" -->
   exec?#25956;鏉?#37813;?#29723;?#37723;?#28000;?#37510;?灏?#37836;?#28051;澶?#38318;?#32459;嬪簭鐨勮緭鍑?#37819;?#37711;?#37714;?#26916;?#38344;?#28051;?#37510;?#37721;?#37819;?#37711;GI绋嬪簭鎴?#38000;?#37828;?#29999;?#29785;?#25652;旂敤绋嬪簭鐨勮緭鍏?#38171;?#26473;?#37721;?#37712;?#27996;?#28003;跨敤鐨?#37721;傛暟鏄痗md杩?#37828;痗gi銆?
    <!--#exec cmd="?#26499;?#27426;鍚嶇О"-->
    <!--#exec cgi="?#26499;?#27426;鍚嶇О"-->
    <!--#exec cmd="?#26499;?#27426;鍚嶇О"-->
    <!--#exec cgi="?#26499;?#27426;鍚嶇О"-->
   鍙傛暟锛?
    cmd 甯?#29785;?#25652;旂敤绋嬪簭
    cgi CGI鑴?#37832;?#32459;嬪簭
   Eg锛?
    <!--#exec cmd="cat /etc/passwd"-->灏嗕細鏄?#32448;?#28725;嗙爜?#26499;?#27426;
    <!--#exec cmd="dir /b"-->灏嗕細鏄?#32448;哄綋鍓?#37929;綍涓嬫枃?#27426;鍒?#29723;?
    <!--#exec cgi="/cgi-bin/gb.cgi"-->灏嗕?#27693;墽琛孋GI绋嬪簭gb.cgi銆?
    <!--#exec cgi="/cgi-bin/access_log.cgi"-->灏嗕?#27693;墽琛孋GI绋嬪簭access_log.cgi銆?
   娉ㄦ剰锛?
    浠?#28051;?#38344;?#37928;?#32448;?#28186;?#37721;?#28000;?#37930;?#37713;?#38171;?#26473;?#28051;?#37816;囦护鐩稿綋鏂逛究锛屼絾鏄?#28052;?#28699;樺湪瀹?#37711;?#38338;?#26864;?#37510;?
   绂?#23005;?#37826;?#23049;?#38171;?
    锛嶢pache锛屽皢access.conf涓?#37928;?Options Includes ExecCGI"杩?#29723;屼唬?#29212;鍒犻櫎锛?
    锛庡湪IIS涓?#38171;岃?#20346;?#20346;敤 #exec 鍛?#28000;?#38171;?#37721;?#28103;?#37824;?SSIExecDisable 鍏?#37825;?#37817;?#25652;?#38171;?
5銆乫lastmod
   <!--#flastmod file="FILE_NAME" -->
   flastmod杩?#37733;濬ILE_NAME?#22669;浠?#29723;?#37928;勬枃?#27426;鐨?#37832;鍚庝慨鏀?#37827;堕棿銆?
   Eg:
    <!--#flastmod file="news.htm"-->
     灏嗗綋鍓?#37929;綍涓媙ews.htm?#26499;?#27426;鐨?#37832;杩?#37831;存柊鏃?#37832;熸彃鎻?#37711;?#37714;板綋鍓嶉〉闈?
6銆乫size
   <!--#fsize file="FILE_NAME" -->
   fsize杩?#37733;濬ILE_NAME?#22669;浠?#29723;?#37928;勬枃?#27426;鐨勫ぇ灏?#37510;?
   <!--#flastmod file="?#26499;?#27426;鍚嶇О"-->
   <!--#fsize file="?#26499;?#27426;鍚嶇О"-->
   鍙傛暟锛?
    file 鎸?#28729;氬寘鍚枃?#27426;鐩?#28725;逛簬鏈枃妗?#37928;?#28003;嶇疆 濡?info.txt 琛?#32448;哄綋鍓?#37929;綍涓?#37928;?#37928;刬nfo.txt?#26499;妗?
    virtual 鎸?#28729;?#37929;?#28725;逛簬鏈?#37716;?#37731;ㄦ枃妗?#37837;?#37929;綍鐨?#28003;嶇疆 濡?/hoyi/info.txt 琛?#32448;?
   娉ㄦ剰锛?
    ?#26499;?#27426;鍚嶇О蹇呴』甯?#37832;夋墿灞曞悕銆?
   Eg:
    <!--#fsize file="news.htm"-->
     灏嗗綋鍓?#37929;綍涓媙ews.htm鐨勬枃?#27426;澶?#28751;?#37711;?#37714;板綋鍓嶉〉闈?
7銆乮nclude
   <!--#include file="?#26499;?#27426;鍚嶇О"-->
   <!--#include virtual="?#26499;?#27426;鍚嶇О"-->
   include鎻?#37711;ILE_NAME?#22669;浠?#29723;?#37928;勬枃?#27426;鐨勫唴瀹?#37510;?
   file ?#26499;?#27426;鍚?#37828;?#28051;涓?#37929;?#28725;硅矾寰?#38171;?#29831;?#29882;?#23536;?#37929;?#28725;逛簬浣跨敤 #include 鎸囦护鐨勬枃妗f墍?#28266;鐨?#37929;綍銆傝?#23512;鍚枃?#27426;鍙?#28000;ュ湪?#24723;涓绾?#37929;綍鎴?#37711;?#28699;?#37929;綍涓?#38171;屼絾涓嶈兘?#28266;涓?#28051;绾?#37929;綍涓?#37510;?#28641;?#29723;?#32448;哄綋鍓?#37929;?nbsp;  ?#32141;涓?#37928;?#37928;刵av_head.htm?#26499;妗?#38171;?#37714;?#28051;篺ile="nav_head.htm"銆?
   virtual ?#26499;?#27426;鍚?#37828;?Web ?#29679;?#20579;涓?#37928;勮櫄?#23257;鐩綍鐨?#28729;屾暣璺?#23536;?#37510;?#28641;?#29723;?#32448;?#37929;?#28725;逛簬鏈?#37716;?#37731;ㄦ枃妗?#37837;?#37929;綍涓媓oyi鐩綍涓?#37928;刵av_head.htm?#26499;?#27426;锛?#37714;?#28051;篺ile="/hoyi/nav_head.htm"
   鍙傛暟锛?
    file 鎸?#28729;氬寘鍚枃?#27426;鐩?#28725;逛簬鏈枃妗?#37928;?#28003;嶇疆
    virtual 鎸?#28729;?#37929;?#28725;逛簬鏈?#37716;?#37731;ㄦ枃妗?#37837;?#37929;綍鐨?#28003;嶇疆
   娉ㄦ剰锛?
    1銆佹枃?#27426;鍚嶇О蹇呴』甯?#37832;夋墿灞曞悕銆?
    2銆佽?#23512;鍚?#37928;勬枃?#27426;鍙?#28000;?#37711;?#37832;?#28000;?#28003;曟枃?#27426;?#22719;灞曞悕锛屾?#25123;寰?#37929;存帴浣跨敤htm?#22719;灞曞悕鏈鏂逛究
8銆乸rintenv
   <!--#printenv -->
    printenv杩?#37733;炴墍鏈?#28729;?#28052;夌殑鍙橀噺鐨?#37714;?#29723;?#37510;?
9銆乻et
   <!--#set var="VARIABLE_NAME" value="VARIABLE_VALUE" -->
   set?#25956;鏉?#38007;?#28729;?#28052;?#37721;橀噺銆傚湪SSI涓?#37832;?#29825;稿?#27693;爣鍑?#37928;?#37721;橀噺(濡侱ATE_LOCAL)锛?#37711;?#28051;?#28052;熷寘鎷?#28725;逛簬CGI绋嬪簭鏈?#37825;?#37928;勭幆澧?#37721;橀噺銆?
10銆乮f elif endif else
   if elif endif else?#25956;鏉?#37833;′欢閫?#37815;?#37510;?
   #if
   浣滅敤锛?鍒?#23524;?#37721;?#28000;?#37824;?#37721;樻暟鎹?#37928;?#26916;?#38344;?#38171;?#26473;?#27996;?#37825;?#37817;?#37837;?#37817;?#28003;跨敤if璇?#37721;?#37827;?#29825;?#32480;?#37928;勮?#20345;眰浜?#28000;?#37828;?#32448;?#37510;?
     璇?#23049;?#38171;?绋嬪簭浠g爜:
    <!--#if expr="$鍙橀噺鍚?"鍙橀噺鍊糀""-->
    鏄?#32448;哄唴瀹?
     <!--#elif expr="$鍙橀噺鍚?"鍙橀噺鍊糂""-->
    鏄?#32448;哄唴瀹?
     <!--#else-->
    鏄?#32448;哄唴瀹?
     <!--#endif"-->
    Eg:
     <!--#if expr="$SERVER_NAME="hoyi.zb169.net""-->
      涓?#37719;嶦鎼滅綉http://www.eshoo.com.cn
     <!--#elif expr="$SERVER_NAME="linux.cqi.com.cn"" -->
      涓?#37719;嶦鎼滅綉http://www.eshoo.com.cn/bbs
     <!--#else-->
      涓?#37719;嶦鎼滅綉http://www.eshoo.com.cn
     <!--#endif"-->
娉ㄦ剰锛??#25956;浜庡墠闈?#37816;囦护涓?#37928;?#37721;?#37826;?#37833;?#38171;屾槸?#25956;鏉?#28000;?#37817;?#37712;呴儴鐨?#23534;?#37721;?#38171;屼互渚垮畠浠?#28051;嶄?#27699;瑙?#38322;?#28051;?#32513;?#37833;?#29723;?#26440;?#23534;?#37510;?#28051;嶅彲鐪佺暐銆?
 
鍏?#37510;佹櫘閫氱敤娉?
1銆?#28051;?#38344;?#37828;?#28051;浜?#23011;旇緝甯?#29785;?#37928;?span class="hilite2">SSI鐨勭敤娉?#38171;?
   鏈鍚庝慨鏀?#37827;堕棿
    鏈?#28051;?#32457;?#37826;?#23049;?#38171;?
    This file last modified <!--#flastmod file="ssi.shtml" -->
    This file last modified <!--#echo var="LAST_MODIFIED" -->
   ?#23512;鍚?#28051;涓猣ooter
    <!--#include virtual="/footer.html" -->
   璁?#32515;甧rrmsg
    <!--#config errmsg="[error message!]" -->
   璁?#32515;畇izefmt
    <!--#config sizefmt="bytes|abbrev" -->
   鎵?#29723;?#37723;?#28000;?
   <!--#exec cmd="dir" -->
2銆侀珮绾?span class="hilite2">SSI
   XSSI锛圗xtended SSI锛?#37828;?#28051;缁勯珮绾?span class="hilite2">SSI鎸囦护锛屽?#21615;疆浜嶢pache 1.2鎴?#37831;撮珮鐗?#37832;?#37928;刴od-include妯?#37735;?#28052;?#28051;?#37510;?
    鍏?#28051;?#37721;?#37714;╃敤鐨?#37928;勬?#22246;护鏈?#38171;?
    <!--#printenv-->
    <!--#printenv-->
    <!--#printenv-->
    <!--#printenv-->
   浣滅敤锛?鏄?#32448;哄綋鍓嶅瓨?#28266;浜嶹EB鏈?#37716;?#37731;?#37916;?#28583;?#28051;?#37928;勬墍鏈夌幆澧?#37721;橀噺銆?
   锛?锛?set
    浣滅敤锛?#37721;?#32513;?#37721;橀?#24538;?#23338;?#38171;屼互?#25956;浜庡悗闈?#37928;刬f璇?#37721;?#37510;?
    璇?#23049;?#38171;?#32459;嬪簭浠g爜:
      <!--#set var="鍙橀噺鍚?value="鍙橀噺鍊?-->
    鍙傛暟锛?#37827;?
    绀?#28186;?#38171;?绋嬪簭浠g爜:
     <!--#set var="color"value="绾㈣壊"-->
     SSI鍏?#29825;?#38007;?#28729;?#28052;?#37721;橀噺锛?#26473;?#27996;?#37721;橀噺鍙?#28000;ョ敤鏉?#26473;?#29723;屾?#26055;?#20904;拰鏉′欢鍒?#37826;?#37510;?
    瀹?#28052;?#37721;橀噺
     <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
    鏉′欢琛?#26440;?#23534;?
     <!--#if expr="test_condition" -->
     <!--#elif expr="test_condition" -->
      <!--#else -->
     <!--#endif -->





]]>
11选5时时彩软件
  1. <mark id="ghavm"><button id="ghavm"></button></mark>

      <listing id="ghavm"><strong id="ghavm"></strong></listing>
      <code id="ghavm"></code><rt id="ghavm"><label id="ghavm"><legend id="ghavm"></legend></label></rt>
      1. <tt id="ghavm"><button id="ghavm"></button></tt>

        1. <mark id="ghavm"><button id="ghavm"></button></mark>

            <listing id="ghavm"><strong id="ghavm"></strong></listing>
            <code id="ghavm"></code><rt id="ghavm"><label id="ghavm"><legend id="ghavm"></legend></label></rt>
            1. <tt id="ghavm"><button id="ghavm"></button></tt>