zoukankan      html  css  js  c++  java
  • 搜索内容汇总

    坐标拾取:http://api.map.baidu.com/lbsapi/getpoint/index.html

    跳转302链接或者是地址不便,显示某文件内容

    string ip = string.Empty;
            Dictionary<string, string> place = com_1633_tools.Ip.GetPlaceByIp(ip);
            string city = place["city"].TrimEnd('市');
            var model = db.GetModel<tbl_siteconfig>(m => m.city == city);
            if (model != null)
            {
                Response.Redirect("http://" + model.shortname + ".1633.test");
            }
            else
            {
                Encoding code = Encoding.GetEncoding("gb2312");
                // 读取模板文件 
                string temp = HttpContext.Current.Server.MapPath("/index.shtml");
                StreamReader sr = null;
                string str = "";
                try
                {
                    sr = new StreamReader(temp, code);
                    str = sr.ReadToEnd(); // 读取文件 
                }
                catch (Exception exp)
                {
                    HttpContext.Current.Response.Write(exp.Message);
                    HttpContext.Current.Response.End();
                    sr.Close();
                }
                Response.Write(str);
    

      

  • 相关阅读:
    星空雅梦
    星空雅梦
    星空雅梦
    星空雅梦
    星空雅梦
    星空雅梦
    星空雅梦
    星空雅梦
    lambda表达式
    VIM--保存和退出等命令
  • 原文地址:https://www.cnblogs.com/sophiel/p/9237206.html
Copyright © 2011-2022 走看看