Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

php and absolute path for images

Guest
Jan 15, 2008 Jan 15, 2008
I have a php driven site. There are different folder levels relative to the images folder from which files can be loaded. I would like to use an absolute path when pointing to images, so that the code can be re-used in different files. In order to do this I create a variable which points to $_SERVER[SERVER_NAME] and then complete the image path from there.

The problem is that Dreamweaver doesn't recognize php code, therefore the images don't appear, and it becomes impossible to develop the graphical portions of the site because the blank images mess up the table layouts, etc...

How can I see the images while still using php code? Is this even possible?
TOPICS
Server side applications
254
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 15, 2008 Jan 15, 2008
LATEST
mncheetah wrote:
> The problem is that Dreamweaver doesn't recognize php code

It most certainly does. Dreamweaver has extensive PHP functionality.

> images don't appear, and it becomes impossible to develop the graphical
> portions of the site because the blank images mess up the table layouts, etc...

The way to solve your particular problem is to install Apache on your
computer, create a virtual host to accommodate the site, and use Live
Data view to parse the PHP code while you're designing.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines