|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6817 fopen doesn't work with $var ?
Submitted: 2000-09-20 18:43 UTC Modified: 2000-10-16 11:03 UTC
From: carl dot schreiber at web dot de Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.2 OS: Linux Suse 6.4
Private report: No CVE-ID: None
 [2000-09-20 18:43 UTC] carl dot schreiber at web dot de

I'm lost with a problem that I don't really understand,
may it's a bug?
(working on Suse Linux 6.4 & php4)
This way the file is created written and closed:
$fp = fopen("/tmp/zytest.tmp","w");
$i = fputs($fp, "TEST");
$j = fclose($fp);
All results are ok: $fp =..#1, $i=4, $j=1;

This way all the results (echo...) seems to be ok,
but no file is created, no file is in that folder hereafter?
$fp = fopen($dfn, "w");
$i = fputs($fp, "TEST");
$j = fclose($fp);
The echo.. results are the same: $fp =..#1, $i=4, $j=1;

So if I hardcode folder and filename fopen() works,
if I assign the folder and file to a variable,
nothing happens?
Does anybody know what to do?

Thanks a lot in advance,


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-21 08:36 UTC]
I tried this (with latest CVS) and it works. Please try latest CVS or snapshot

 [2000-10-16 11:03 UTC]
I can not reproduce. And no feedback.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 17:01:27 2024 UTC