Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
this is the error:
Warning: require_once(db_con.php): failed to open stream: No such file or directory in C:\xampp\htdocs\student-enroll-system\View\login.php on line 1

Fatal error: require_once(): Failed opening required 'db_con.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\student-enroll-system\View\login.php on line 1

if someone knows please write the answer for me

What I have tried:

I did not try anything to fix.
Posted
Updated 12-Apr-21 22:32pm
Comments
Patrice T 11-Dec-20 3:53am    
Which word you don't understand in No such file or directory ?
Richard MacCutchan 11-Dec-20 4:00am    
What part of "No such file or directory" do you not understand?
W Balboos, GHB 13-Apr-21 7:13am    
It has been over four months since you first posted this and you still seem to have tried nothing. If this is important then maybe you should hire programmer.

Quote:
I did not try anything to fix.

Well why not? You would have saved yourself both time and effort ...

Start by reading the error message, it's pretty explicit:
failed to open stream: No such file or directory

It means that you have passed a file path to a function that tries to open a DB and it cannot find a file with that name on the specified path.

We can't fix that for you: we have no idea what the path is, and no access to your file system.

So start by finding out what the file path is (the debugger will help you here, or add logging statements to find out), and the look at the file system that is executing your code to find out what is wrong with the path.

We can't do any of that for you!
 
Share this answer
 
There are two main causes for that error:

1 - you misspelled the file name.
2 - the path is wrong.

For the wrong path, it's often because the folder your in when trying to open the file is not in the same folder as the file. You need to fix the path to find the file.


 
Share this answer
 
Comments
lernik khechoomian 11-Dec-20 14:51pm    
this is my code :







<title>Student Management System



Home Page











Login Form
'.$input_arr['input_user_error'].'':''; ?>
'.$input_arr['input_pass_error'].'':''; ?>

Sign in







If you have don't user account, You can Sign Up

Copyright © 2016 to




and require-once line has error . I checked the path but I could not solve the error . my Code is in reply part does not show well that can show you my code.
W Balboos, GHB 14-Dec-20 7:52am    
What you posted, above, does nothing to help solve the problem.

Depending upon the server, file names may be case-sensitive.

I don't know where your files in in what sort of folder structure: you do. If a file cannot be found it is because what you are asking for is not there. Find out what's wrong with what you are asking for: Where is your page, where is the not-found page it wants to open? Exactly how is it spelled?

Now it also seems, with that copyright notice, that you copied the code from somewhere - Maybe you should figure out what it does and what it need. PERHAPS YOU DIDN'T COPY OVER THE FILE IT NEEDS SO IT CANNOT BE FOUND BECAUSE IT IS NOT ON YOUR SYSTEM.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900