asp.net 虚拟路径

VirtualPathUtility 为常见的虚拟路径操作提供实用工具方法。 虚拟路径:指的是 以 ~/ 或者是正斜杠 / 开头的路径,如: string virtualPath1 = "~/abc/"; string virtualPath2 = "/abc"; 绝对路径 absolute ,是正斜杠 / 开头的路径。 想对路径 relative ,是 ~/ 开头的路径。 VirtualPathUtility.IsAbsolute("/abc") // true VirtualPathUtility.IsAppRelative("~/abc") // true Read more

asp.net mvc 路由绑定域名

原文地址:https://gist.github.com/IDisposable/77f11c6f7693f9d181bb using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Text.RegularExpressions; using System.Web; using System.Web.Http; using System.Web.Http.Routing; using System.Web.Mvc; using System.Web.Routing; Read more

PHP 常用

1, 跳转 header("Location: abc.php");exit; 2.文件下载 $filepath = (you file path); //$_SERVER['DOCUMENT_ROOT'] header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($filepath)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: '.filesize($filepath)); readfile($filepath); Read more

Abp 扩展设置

在ABP 框架中,已经自带了设置管理。包括读取,存储和修改。不过,设置管理 都是 以 设置名称(name) 来读取控制的。在一些情况下,我希望 将设置的一类值放在一起,以单独的一个类(实体) 来读取访 Read more

...56789...