Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-07-2009
Member
 
Join Date: May 2009
Posts: 18
"Failed to open stream No such file or directory" error in PHP

I am getting "Failed to open stream No such file or directory" in PHP can some one help me fix this error ?
Reply With Quote
  #2  
Old 13-07-2009
Member
 
Join Date: Dec 2008
Posts: 99
Re: "Failed to open stream No such file or directory" error in PHP

This error occurs when you attempt to access any function be it a file or folder that does not exist.

Delete the line containing the problem if it is not essential to the script.
If we need to test the existence of the file you can use the function file_exists () like this:

Code:
<? php 
if (file_exists ( 'filename.ext')) 
( 
/ / code which requires the file here 
) 
>
Reply With Quote
  #3  
Old 13-07-2009
Member
 
Join Date: Dec 2008
Posts: 86
Re: "Failed to open stream No such file or directory" error in PHP

It is saying that the file/ folder it is trying to open is not exist. Have you checked to make sure the path is correct?
Reply With Quote
  #4  
Old 13-07-2009
Member
 
Join Date: Dec 2008
Posts: 98
Re: "Failed to open stream No such file or directory" error in PHP

Make sure to set permission to 777, File doesn't exist, spelled wrong, lower/upper case. For a folder you can use the is_dir () like this:
Code:
<? php 
if (is_dir ( 'File')) 
( 
/ / code that need the file 
) 
>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: ""Failed to open stream No such file or directory" error in PHP"
Thread Thread Starter Forum Replies Last Post
Microsoft Excel file open error " Not a valid single file web page" Whelan MS Office Support 3 31-12-2013 10:36 AM
chroot error- "No such file or directory" aMADEUS aLLEN Operating Systems 4 15-01-2011 07:11 PM
Getting "Converter Failed to Save the File" error message eileeng Windows Software 1 24-09-2010 09:53 AM
Error message "crt0.o no such file or directory" Francesca Operating Systems 1 19-02-2009 12:34 PM


All times are GMT +5.5. The time now is 12:43 PM.