Home > Backend Development > PHP Tutorial > fopen没法正确创建新文件

fopen没法正确创建新文件

WBOY
Release: 2016-06-13 12:00:26
Original
1135 people have browsed it

fopen无法正确创建新文件
$fp = fopen("/www/modernsky/test_id_validater/1.jpg","wb") or die("can't open file");
$fp = fopen("1.jpg","wb") or die("can't open file");
这些语句始终返回“can't open file",不明白哪里出问题了
------解决方案--------------------
看看是否有目录仅限。
chmod 777 目录名
$fp = fopen("1.jpg","wb") or die("can't open file");

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template