php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39977 file opening problems
Submitted: 2006-12-28 14:03 UTC Modified: 2006-12-28 14:12 UTC
From: sonikunal_4u at yahoo dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.4.4 OS: Enterprise Linux AS
Private report: No CVE-ID: None
 [2006-12-28 14:03 UTC] sonikunal_4u at yahoo dot com
Description:
------------
Hi, all 

I am new to php so please someone help me out.

I just want to include a directory path so that the required file can be read from there.

here are the settings done in php.ini file

include_path = ".:/Data/writefile"

the "Data" directory is located at root of the linux.

and my default directory for apache is "/var/www/html"

the code that is generating the error is written here,

$fp = fopen("read.txt","r",1) or die("Cannot open file to read");

Note: the file in not on the default directory "/var/www/html"

but the code generated the following error

Warning: fopen(read.txt): failed to open stream: No such file or directory in /var/www/html/readfile.php 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-28 14:12 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 16:01:31 2024 UTC