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 Active Member

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

    
    <?
       include("somefile.php");
    ?>
    <b>SOME HTML</b>
    <?
       include("anotherfile.php");
    ?>
    
    PHP:
    Just code it all in code view :)
     
    Louis11, Apr 20, 2008 IP