1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php in design view - Dreamweaver CS3

Discussion in 'Programming' started by Mr Illustrator, Apr 20, 2008.

  1. #1
    Hi everyone,

    I’m having a few problems with .php in Dreamweaver CS3.
    Basically I want to edit the layout & design of a website, all the pages are .php. Why will the .php files not show up in design view?

    Some of the code looks like this:

    <?php

    session_start();
    include("include/config.php");
    include("include/functions/import.php");
    $thebaseurl = $config['baseurl'];

    $templateselect = "aboutus.tpl";
    $pagetitle = $lang[1];
    STemplate::assign('pagetitle',$pagetitle);

    //TEMPLATES BEGIN
    STemplate::assign('error',$error);
    STemplate::display('header.tpl');
    STemplate::display($templateselect);
    STemplate::display('footer.tpl');
    //TEMPLATES END
    ?>

    This was in the aboutus.php file.

    I’m a designer and code is something I don’t know much about, I know my why around Dreamweaver and can design websites but only using .html.

    I was watching a Dreamweaver tutorial and I watched someone drop a .php file into Dreamweaver and all the graphics popped up in the design view?!

    This is driving me nuts! Someone please help!

    Cheers
     
    Mr Illustrator, Apr 20, 2008 IP
  2. Louis11

    Louis11 Peon

    Messages:
    782
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Dreamweaver doesn't doesn't parse PHP. If you have HTML in your PHP file they will show up in design view.

    PHP:
    1.  
    2. <?
    3.    include("somefile.php");
    4. ?>
    5. <b>SOME HTML</b>
    6. <?
    7.    include("anotherfile.php");
    8. ?>
    9.  
    Just code it all in code view :)
     
    Louis11, Apr 20, 2008 IP