awarraic
asked on
Understanding PHP code - absolute path
I am working on a php web application. Trying to understand the path to files:
What does following code means?
img src="$$application_setting s::base_pa th$$images /header.gi f"
Why are there two dollar signs? (it's php 4.4.7)
What does following code means?
img src="$$application_setting
Why are there two dollar signs? (it's php 4.4.7)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I make that header display?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
*** $$ IS EXTREMELY DANGEROUS ***
Basically,
$$image will create a "PHP variable" with the name CONTAINED in the variable $image.
so if:
$image = 'pictures';
$$image would reference a variable named $pictures
Wha you want is to just change it to:
Basically,
$$image will create a "PHP variable" with the name CONTAINED in the variable $image.
so if:
$image = 'pictures';
$$image would reference a variable named $pictures
Wha you want is to just change it to:
img src="http://www.yourwebsite/com/images/header.gif" // path to header.gif
Correction $$ will reference a variable based on the $variable
so if:
$image = 'pictures';
$image would reference a variable named $pictures
so if:
$image = 'pictures';
$image would reference a variable named $pictures
http://www.php.net/manual/en/language.variables.variable.php