473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How to fix "ailed to open stream: No such file or directory" error?

2
hi all,
i'm doing a project using php & now i'm stuck with an error which is difficult to resolve by myself.

i have a file named "welcome.php" inside a folder called "PROJECT" in "C:\AppServ\WWW\"
& inside that "PROJECT", i'm having a sub-folder called "rpts", which contains some php files using for reports. (i used "PHP Report Maker 4" software to create those reports)

problem is;
when i click on the button "view reports" in the "welcome.php" page (main page); i want to display the "index.php" file which is inside the "rpts" folder.

i used the following code; but it's giving errors

Expand|Select|Wrap|Line Numbers
  1. if(isset($_POST['btnrpt']))
  2.     {
  3.     include('..\rpts\index.php');
  4.     }
  5.  
[errors]:
Warning: include(..\rpts\index.php) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\PROJECT\welcome.php on line 51

Warning: include() [function.include]: Failed opening '..\rpts\index.php' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\PROJECT\welcome.php on line 51


if anyone can find the error; pls help me

thnx in advance
Jan 30 '11 #1
2 2591
Markus
6,050 Expert 4TB
Well, if your directory structure is like this C:\AppServ\WWW\PROJECT\rpts, and your welcome.php is in the PROJECT directory, you can access index.php in rpts like so:
Expand|Select|Wrap|Line Numbers
  1. include 'rpts/index.php';
  2.  
In your code, you use ../ in your relative path, which says 'go to the directory above the current directory, and look for the rpts folder there.'
Jan 30 '11 #2
udaras
2
thank u for ur reply
i hv edited my coing as u given
Expand|Select|Wrap|Line Numbers
  1. include 'rpts/index.php';
but now it says

The webpage cannot be found
HTTP 404
Most likely causes:
•There might be a typing error in the address.
•If you clicked on a link, it may be out of date.

What you can try:
Retype the address.

Go back to the previous page.

Go to and look for the information you want.

More information


Do u hv any idea regarding the PHP REPORT MAKER 4 software? i'm not sure whether i'm trying to access the correct file to view reports (index.php)

pls help me to rectify that matter

thanks
Feb 6 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: public heath vb developer | last post by:
We have a solution with 29 projects including a main menu and 28 dlls. One of the projects (Project B) was created by copying an existing project (Project A), making changes including the assembly...
2
by: Rudy Ray Moore | last post by:
How can I modify the project build order of a multi-project workspace under "Visual Studio .net 2003 7.1 c++"? I tried to modify the .sln by hand to influence the build order, but it didn't seem...
1
by: Jerad Rose | last post by:
Hello, I have searched all over for the answer to this, to no avail. I have a web project already set up and running on a remote server, that I created from my home computer. I am now trying...
11
by: Dave | last post by:
I copied the project files from an ASP.NET project on one computer and want to create the project on another computer, There is no connection between the two computers so I simply copied the...
4
by: Brad | last post by:
I'm not one to rant or flame....so please excuse me while I do so for this once. I've now spent a bit of time working with VS2005 beta 2 to see how it functions for web development, especially how...
7
by: Mantorok | last post by:
Hi all We have an ASP.Net project (and the Solution) under source-control. Here is the example - I create the Solution, I create an ASP.Net project and then check it all in to source control,...
6
by: liu | last post by:
Hi all, in my vb.net solution, i have 3 project: 1. Main-this is the startup or the base of my window application. 2. Sales-this is the project that contains all the sales info 3. Product-this...
9
by: Anubhav Jain | last post by:
Hi, I am having few .net source files(.cs or .vb) and I want to dynamically generate the corresponding .net project file(.csproj or .vbproj) for them without using visual studio.So that I could...
3
by: Jerad Rose | last post by:
This is regarding Visual Studio 2003 (framework 1.1). We have several projects/libraries. Of course, many of these reference each other. If we only had one solution, we would simply add all of...
29
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.