Link to home
Start Free TrialLog in
Avatar of awarraic
awarraicFlag for United States of America

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_settings::base_path$$images/header.gif"

Why are there two dollar signs? (it's php 4.4.7)

Avatar of Greg Alexander
Greg Alexander
Flag of United States of America image

I never use $$ but here is the explanation of it:

http://www.php.net/manual/en/language.variables.variable.php 
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of awarraic

ASKER

How do I make that header display?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NerdsOfTech
*** $$ 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:
img src="http://www.yourwebsite/com/images/header.gif" // path to header.gif

Open in new window

Correction $$ will reference a variable based on the $variable

so if:
$image = 'pictures';
$image would reference a variable named $pictures