php创建软链接
来源:互联网 发布:烟台淘宝运营 编辑:程序博客网 时间:2024/05/18 16:57
当在服务器中访问www目录之外的文件时,可使用创建软链接的方式
function newSymlink($path){
$manual = $path; // 原路径$manualLink = './uploadSymlink/'.date('Y-m-d H:i:s'); // 软连接路径
$isExistFile = true; // 原文件是否存在的标识
if(is_file($manual) && !is_file($manualLink)){ // 原文件存在且软连接不存在时,创建软连接
symlink($manual, $manualLink); // 创建软连接
if(!is_file($manualLink)) $isExistFile = false;
}elseif(!is_file($manual)){ // 原文件不存在时
$isExistFile = false;
}
return array('isExistFile'=>$isExistFile,'manual'=>$manualLink);
}
在页面中直接使用$manualLink就行
0 0
- php创建软链接
- PHP创建迅雷、快车、旋风链接
- 创建软链接
- 软链接的创建
- linux创建软链接
- win7创建软链接
- Linux 创建软链接
- ubuntu创建软链接
- 怎么样创建软链接和硬链接
- Windows下创建硬链接和软链接(符号链接)
- Ubuntu下创建软链接
- Linux下创建软链接
- windows下创建软链接
- 用php代码实现数据库的链接,创建表格等
- 原生php链接mysqlhelper类,创建、删除、修改等操作
- 创建链接
- PHP链接
- Windows 下也能创建硬链接和符号(软)链接
- 1. 简单工厂设计模式
- ClassTemplateLoader模板使用学习
- Python 日期处理
- poj--1141 Brackets Sequence(dp)
- 实习入职第二天:ant学习(1)
- php创建软链接
- 【LeetCode-106】Construct Binary Tree from Inorder and Postorder Traversal
- 程序员这个职业的危险期你知道吗
- MVC5中后台提供Json,前台处理Json,绑定给Dropdownlist的例子
- cocopods升级到1.0,导入第三方库,出现问题及解决方式
- 源码提供!Android即时通讯和sns开源项目汇总
- CocoaPods的最新安装流程
- BZOJ 4521: [Cqoi2016]手机号码
- caffe学习笔记(1):数据层定义