vampirelovr
Dec 13 2008, 04:51 AM
hello. I will make up a script that is similar to the one I am using for my example.
question: am I writing this script right? what I want to do is use a file that is 2 folders in (from the parent folder) and use that file.
require_once mysite_ROOT.'images/'.sitetemplate.'/header.php';
if no please write that correctly it would be greatly appreciated.
@Trippin7464
Sorry about my mistake. I forgot to ask the question:)
Andrew
Dec 13 2008, 05:45 AM
Can you rephrase the question, and to be honest I don't see how that would do anything, but I can't rewrite it without knowing what your doing.
is '.sitetemplate.' supposed to be a variable?
Alex
Dec 13 2008, 12:34 PM
Provided that "mysite_ROOT" and and "sitetemplate" are both constants which have been defined to generate a valid path to the file you want, yes. You can check if this is the case by switching the require_once into an echo to see what path is being generated.
Andrew
Dec 14 2008, 03:17 AM
Considering your rewrite of the question, why not go for simple:
require_once './folder/folder/file.php'
or as alex has said sitetemplate would work if it's been set as a constant.
if not, you would want to use $sitetemplate
Depends on if you wrote the script yourself, or if you are writing something to be added on to a script someone else wrote.
vampirelovr
Dec 14 2008, 05:59 AM
QUOTE(Trippin7464 @ Dec 13 2008, 10:17 PM)

Considering your rewrite of the question, why not go for simple:
require_once './folder/folder/file.php'
or as alex has said sitetemplate would work if it's been set as a constant.
if not, you would want to use $sitetemplate
Depends on if you wrote the script yourself, or if you are writing something to be added on to a script someone else wrote.
I am editing a script for my friend and that wasn't working correctly so I wanted to see if it was right or not but I will just us e the simple way you suggested trippn.
thanks for all the help
Andrew
Dec 14 2008, 06:21 AM
If you post the script, or a link to download and what file your editing, i'm sure someone here can figure it out
vampirelovr
Dec 14 2008, 06:06 PM
QUOTE(Trippin7464 @ Dec 14 2008, 01:21 AM)

If you post the script, or a link to download and what file your editing, i'm sure someone here can figure it out
well as you said in your 2nd post to just go simple it works and I will just stick with that. thanks so much trippin.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.