Click here to Skip to main content
15,936,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have this problem for every file so i am not writing whole coding i am writing few lines and than i am explaining the error.

1. <?php

2. include_once("C:\\Users\arif\\Desktop\\newregistration\\checkuserlog.php");

3. ?>

Warning: include_once(C:\Users\arif\Desktop\newregistration\checkuserlog.php)

failed to open stream: No such file or directory in /home/content/80/8261380/html/index.php on line 3

i am including the file name checkuserlog.php and i checked it path for the file is C:\Users\arif\Desktop\newregistration\checkuserlog and the type of the file is phpscript (.php)

this problem i have in every file which i am trying to include in the index. So if some body able to solve it for me i will be able to solve others,

Updated 7-Jun-12 17:19pm
arifsuhail 7-Jun-12 23:18pm    
now i am using \\ slash its solved my one problem thanks
Mohibur Rashid 7-Jun-12 23:36pm    
Dont use absolute path. that is not healthy
arifsuhail 7-Jun-12 23:41pm    
thanks, but so which path i should use?? please explain, this whole file as you can see it from the path is on desktop thanks
Mohibur Rashid 7-Jun-12 23:50pm    
use relative path
such as
index.php must have to be in a directory.
if checkuserlog.php is in the same directory then do like below:
if it is in the other directrory such as
then include_once("newregistration/checkuserlog.php");

there is few other way you better learn how to browse directory in console mode then you will get clear idea
arifsuhail 8-Jun-12 0:13am    
thanks for the help, it solved it


1 solution

first remember \ is an escape character. when you need to use slash use double slash. i.e.
Share this answer

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