473,385 Members | 1,356 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,385 software developers and data experts.

how do I return to a different directory in PHP

I am writing a script that uses different directories to get php files and html files.

directory structure looks like this

/includes (directory to php files)
/secure (directory to HTML files)
/ (root directory to index.php)

I have been looking at the $_SYSTEM['DOCUMENT_ROOT'] and trying to get it to return the / directory, but it ends up going to the httpd/PRIMARY directory which is not in the same website that I am working on. I am lost. .. lol

this is the code I have been trying. . .that does not work.
Expand|Select|Wrap|Line Numbers
  1. $level_page = ($_SERVER['DOCUMENT_ROOT']."/secure/level1.html");
Feb 10 '10 #1
4 1254
Oh, I am using SME 7.4 server and PHP 4.3
Feb 10 '10 #2
Markus
6,050 Expert 4TB
Try the dot-slash directory prefix (./). That resolves to the root directory execution started in.
Feb 10 '10 #3
what syntax would I use to put that in?

chdir("./") ?
Feb 10 '10 #4
Thank you Markus for that info. . . .sent me in the right direction.
Feb 11 '10 #5

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

Similar topics

0
by: KENNY L. CHEN | last post by:
I have a table with a CHAR column which stored a COBOL redefined record. I tried to retrieve part of the field from the column with Oracle substr function. Here is one of example: The...
1
by: JC | last post by:
Hello. I am 100% stumped by this and am very needy of a fix. Please help me figure out why this code does not work- I can access active directory information but can not return email address....
2
by: Paul Bearden | last post by:
I built a web application in C#.Net. It compiles and runs fine however... I need to move some of the files to a directory (actually another web site on the same server) to use the SSL...
4
by: LamNgo | last post by:
Hi group, I have two application that need to communicate with each other, one written in C++ and the other in VB.NET. To communicate, I use "SendMessage" API to send message from C++ app to...
2
by: Danny Boy | last post by:
Hi, "Snif" is an excellent little script to index files and directories. It's just one single file, and the advantage is that you merely drop it into the directory you want to index, point a...
3
by: Nathan Sokalski | last post by:
I have my UserControls in a subdirectory called usercontrols. In the code for one of my UserControls I have the following: Public Property adimage() As String Get Return...
2
by: blisspikle | last post by:
Is there any way to use the "imports" keyword for your current solution to use code (classes) that were used in a different solution in a different directory without compiling them to a dll? I...
3
by: singhPrabhat | last post by:
I want to compile source files which is in different directory than Makefile. How can I do this? GCC=gcc DEFs=-DCUSTOMERCENTRAL_V11 -DUNIX -DLINUX -DOPENSSL -D_REENTRANT CCWebConfiguration.o:...
1
by: TBass | last post by:
In a remoting application I wrote, I have a server program that uses a couple dll's I wrote to provide a tcp remoting connection. I then wrote a test program that uses those same two dlls. When...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.