PHP - 编辑根上的文本文件 [英] PHP - editing text file above root

查看:153
本文介绍了PHP - 编辑根上的文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PHP&我想把一个文本文件放在网站根目录的上方(外面),这样用户就无法访问它。
但是我想知道如何从代码中读取它,我想打开,编写/编辑一些数据然后保存。



请给我一个例子。

谢谢, 解决方案

系统部分,你可以找到很多很好的例子。检查链接:




I'm using PHP & i wanted to put a text file above(outside) the website root so users can't access it. But i wanted to know how can i read it from my code, i want to open, write/edit some data then save it.

Please give me an example.

Thanks ,

解决方案

in PHP's manual, File System section you find a lot of good examples to do that. Check the links:

这篇关于PHP - 编辑根上的文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆