Announcement

Collapse
No announcement yet.

Q on the include statement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Q on the include statement

    I use a bunch of include statements on my pages and do most of my basic layout design in Front Page.

    Any include statement I have actually downloads what is included when loaded into front page. If I then make a change and save it, it saves itself with the actual info that is included, not the include statement.

    What I was wondering is if there was a trick to stop it from doing this? It does not take that long to rewrite 10 include statement, but it gets annoying.

    For the most part this is not that big of deal for me because I am making almost all of my content delivered through and include statement - which means I dont have to touch it when I am done, but if I add or change advertisers I have to worry about it again.

    Any ideas on how to fix this? Or do I just live with the inconvenience?

  • #2
    I'll tell you the easiest way to do this.

    Uninstall Front Page, and heave the disk out the window. Just make sure to uninstall it before you throw the disk out the window, because as I found out the hard way, you can't uninstall FP2000 without the disk. Grrr.

    The next step would be to go get a real program, like Dreamweaver or Home Site.

    If that's not an option, this is what you should do:

    <script language="php">
    include ("yourfile.inc");
    </script>

    Front Page will leave your code alone if it's inside a <script> tag.

    HTH

    -jim

    Comment


    • #3
      even dreamweaver II can't seem to deal with php code embedded in html.. seems to want to play with it the whole time.. infuriating. Dreamweaver 3 luckily manages. 4 is coming out soon.. wonder if it will be worth upgrading to...
      Christopher Padfield
      Web Based Helpdesk
      DeskPRO v3.0.3 Released - Download Demo Now!

      Comment


      • #4
        Dreamweaver3 constantly amazes me. I don't know what 4 could bring to the table that it already doesn't do extremely well...

        -jim

        Comment


        • #5
          glad to see there is another dreamweaver addict here. I can't deal with the "i only use notepad" people
          Christopher Padfield
          Web Based Helpdesk
          DeskPRO v3.0.3 Released - Download Demo Now!

          Comment


          • #6
            I can't deal with the "i only use notepad" people
            I only use UltraEdit, does that count? I kinda have to though - all my html is in my php scripts (doh!)

            Comment


            • #7
              thanks for the answers - I am still a baby at all this so I am learning day by day.

              Comment


              • #8
                ed.. yup that is the problem i am finding....

                out of interest.. does it make any difference on server load/performance whether html is in the php or not...

                ie is there a difference between

                <html>
                <head>
                <title>sdfsafa</title>
                </head>
                <body>

                <?php

                if ($action="1")
                {

                ?>

                Some html here

                <?php
                }
                ?>

                general html here

                <?php

                if ($action="2")

                ?>

                normal html

                <?php
                }
                ?>

                is that like ok or would you not recommend doing it like that? When i gets down to it.. would you do:

                <a href="http://www.domain.com/index.php?action=
                <?php echo "$action"; ?>
                &name=blah

                sort of thing...

                just means i can do html in dreamweaver if i do it like that.
                Christopher Padfield
                Web Based Helpdesk
                DeskPRO v3.0.3 Released - Download Demo Now!

                Comment


                • #9
                  It doesn't matter in terms of load/difference in processing. It'd be SOOOO tiny, it's not worth worrying. For personal preference though, I prefer to echo out strings with lots of variables. Don't like typing <?php echo $blah; ?>

                  Comment


                  • #10
                    I'm still trying to figure out how I like to do it the best, too. My favorite way is by using the vB templates - eg I make my script a function in vB's global.php. Usually I'll just use a lot of print's, depending on how much HTML there is.

                    -jim

                    Comment


                    • #11
                      I'm a CuteHTML only person
                      eheh
                      HTML embedded within PHP would be a nightmare in dreamweaver.

                      Comment


                      • #12
                        i would like to use templates as well. The whole fasttemplate thing or whatever it is called looks like too much hard work.

                        But vbulletin ones look good. I just don't quite understand how the database lookups really work yet, used to the simple versions in the books. Once i fully understand that then i think vbulletin's templates are the way to go as a system...

                        I just wish the other scripts i am adding to my site where in php and not in flipping perl! (imagefolio and links sql). a pain really...
                        Christopher Padfield
                        Web Based Helpdesk
                        DeskPRO v3.0.3 Released - Download Demo Now!

                        Comment


                        • #13
                          Originally posted by Anscoop
                          HTML embedded within PHP would be a nightmare in dreamweaver.
                          Actually, it's quite easy. No nightmares involved at all.

                          -jim

                          Comment


                          • #14
                            Actually, yeah you're right Jim.... it places those little icons for the code in the WYISWYG window..
                            but I was going for the dramatic effect, you see

                            Comment


                            • #15
                              It is a nightmare when everything is dynamically generated content -- including the layout. So basically the whole thing goes through a bunch of loops, etc..

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X