HighDots Forums  

Template & PHP Includes

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Template & PHP Includes in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Toronto Boy 25
 
Posts: n/a

Default Template & PHP Includes - 09-13-2005 , 09:23 PM






I started using Dreamweaver 8 today and I just stumbled across a problem.

I use a lot of php includes and templates throughout my sites. When I create a
new template all the include paths are changed adding the Template folder to
the beginning of the path. MX never used to do this... I should think that the
Template should leave alone any path within the PHP tags.

Has anyone else run into this problem? Or is it only me?

Thanks.




Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Template & PHP Includes - 09-13-2005 , 09:34 PM






Are your includes IN the /Templates folder?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Toronto Boy 25" <steven (AT) akicreative (DOT) com> wrote

Quote:
I started using Dreamweaver 8 today and I just stumbled across a problem.

I use a lot of php includes and templates throughout my sites. When I
create a
new template all the include paths are changed adding the Template folder
to
the beginning of the path. MX never used to do this... I should think that
the
Template should leave alone any path within the PHP tags.

Has anyone else run into this problem? Or is it only me?

Thanks.






Reply With Quote
  #3  
Old   
Toronto Boy 25
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 09-13-2005 , 10:04 PM



No, the includes are not. I set the include path at the top of every page as I
use different classes for various things. One being the cfg file that holds the
database connection.

For example...

include("cfg.php");

get turned into: include("Templates/cfg.php");

When I go back to MX04 no problems, the Templates leave the paths in the PHP
alone.

I think this is definitely a bug!


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 09-14-2005 , 07:32 AM



Have you set the http:// field in the local site definition?

There were quite a few changes in how this all fits together going from
DMX2004 to DW8.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Toronto Boy 25" <steven (AT) akicreative (DOT) com> wrote

Quote:
No, the includes are not. I set the include path at the top of every page
as I
use different classes for various things. One being the cfg file that
holds the
database connection.

For example...

include("cfg.php");

get turned into: include("Templates/cfg.php");

When I go back to MX04 no problems, the Templates leave the paths in the
PHP
alone.

I think this is definitely a bug!




Reply With Quote
  #5  
Old   
Toronto Boy 25
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 09-14-2005 , 08:42 AM



I have my site home page defined, but he problem still exits.

Here is a better example.
This code is what displays when I create a new template before I save:


include("file:///C|/Documents%20and%20Settings/User/My%20Documents/Site/Template
s/banners.php");

When I save the file this is what dreamweaver creates:

include("Templates/banners.php");

This is a huge problem, because all my pages, on my corporate intranet have
include files that are protected for easy updating.

I am uploading to a FTP site.

Thanks.


Reply With Quote
  #6  
Old   
Mark Orbit
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 10-26-2005 , 12:21 PM



Do we have a solution for this? It isn't Mac specific, I'm on PC and end up with path rewriting that states that php includes are in the Templates folder when of course they are not.

Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 10-26-2005 , 03:04 PM



Did you answer my question?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Mark Orbit" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Do we have a solution for this? It isn't Mac specific, I'm on PC and end
up with path rewriting that states that php includes are in the Templates
folder when of course they are not.



Reply With Quote
  #8  
Old   
El_sid
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 11-04-2005 , 10:50 PM



I am getting this same problem as well..

My include:

<?php include("nav_toggle_by_cookie.inc.php"); ?>

is being changed to:

<?php include("Templates/nav_toggle_by_cookie.inc.php"); ?>

Is there a fix for this?
//cassidy


Reply With Quote
  #9  
Old   
El_sid
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 11-04-2005 , 11:11 PM



I found a fix here:
http://www.communitymx.com/blog/index.cfm?newsid=601

Hope this helps you all.

//Cassidy

Reply With Quote
  #10  
Old   
Toronto Boy 25
 
Posts: n/a

Default Re: Template & PHP Includes on the Mac - 11-04-2005 , 11:19 PM



Hi,

Yes, I did find a way around this problem. I changed all my include statements
to:

include 'cfg.php';

I removed the () and the double quotes and now it works like it should!

Thanks.

Steven


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.