HighDots Forums  

Dreamweaver PHP Template Include Path

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Dreamweaver PHP Template Include Path in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave McKain webforumsuser@macromedia.com
 
Posts: n/a

Default Dreamweaver PHP Template Include Path - 12-04-2003 , 03:08 PM






I have a php template that contains php includes of the following form

<?php include("../foo.php") ; ?>

When I apply this template to a file in some other directory the path relative include is not updated properly.

It should be changed to (in the instance of a file one directory up from the Template directory)

<?php include("foo.php") :?> but

it remains <?php include("../foo.php") ; ?>

Is this on purpose or is there a problem with Dreamweaver MX



Reply With Quote
  #2  
Old   
mzanime.com webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Dreamweaver PHP Template Include Path - 12-04-2003 , 03:23 PM






If "foo.php" is located at the sites root, then make the include path: <?php include("/foo.php"); ?>, this way bar.php for example can locate the include no matter where it is located at in your site.

Just so you know, DMX doesn't render dynamic code in edit view, only the static bits of it.


MiKE.
Looking for freelance work | mike[at]mzanime.com
$i = &quot;fun&quot;; while($i &gt; $possibilities) { $code; $code++; }

Reply With Quote
  #3  
Old   
gareth
 
Posts: n/a

Default Re: Dreamweaver PHP Template Include Path - 12-04-2003 , 04:42 PM



You can also use the local server path to the file, in terms of the servers
file system, and this means that wherever you call the file from it will
load correctly.


--
Gareth
http://www.garethdp.com/
Buzz inet - http://www.buzzinet.co.uk/

Team Macromedia Volunteer for Dreamweaver MX
Dreamweaver MX Support: http://www.dreamweavermxsupport.com/index.php

PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
http://www.dreamweavermxsupport.com/extensions/

Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
Co-Author: Practical Intranet Development - Apress
Co-Author: Dreamweaver MX: Advanced PHP Web Development - JApress
Co-Author: Dreamweaver MX: PHP Web Development - Wrox



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.