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

fopen没法正确创建新文件

WBOY
WBOYOriginal
2016-06-13 12:00:261138browse

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");

Statement:
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