hi
i have some file in my ftp.now i am saving my file in a folder.please tell me how to refer the file outside the folder.
eg require_once('../common/dblayer.php');
the above is to refer a file inside a folder.how do the same for outside a folder
queenc
-1
Junior Poster
Recommended Answers
Jump to PostWhat do you meen by saing "Outside of the folder". Because the example you gave shows everything you need to know to include/require a file. The ../ goes up one directory then the common/ goes down to the common directory then opens the dblayer.php.
That simple. So is there anything …
Jump to Postto refer a file
That's the bit I don't exactly understand because I speak australian and to me would seem like to program one file to give another file directions to a location.
So say your file structure was the following:public_html - folder1 - common - …
Jump to PostIn your dblayer.php, echo current working directory. Depending on which directory you are in, you can use ../ to go back one step to previous directory, ../../ to go back 2 steps and …
All 9 Replies
cwarn23
387
Occupation: Genius
Team Colleague
Featured Poster
queenc
-1
Junior Poster
queenc
-1
Junior Poster
cwarn23
387
Occupation: Genius
Team Colleague
Featured Poster
queenc
-1
Junior Poster
queenc
-1
Junior Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
queenc
-1
Junior Poster
almostbob
866
Retired: passive income ROCKS
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.