Are php Includes considered current for website use Still?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mopek1
    Confirmed User
    • Jun 2004
    • 3192

    #1

    Are php Includes considered current for website use Still?

    If I build a php website and use code like this:

    <?php include 'includes/navbar.php';?>

    ... so that when I want to make a change in the navbar across thousands of pages, the entire site is updated by changing one file only in the /includes folder.

    Is that current or is everyone onto a different version of php, or different code etc...?

    If I build a new site I want it to be able to adapt to any future change without having to individually change each page (or worse, rebuild the site) which would take forever.

    Thanks.
  • WiredGuy
    Pounding Googlebot
    • Aug 2002
    • 34512

    #2
    I still do this with Perl... old school for life
    WG
    I play with Google.

    Comment

    • NoWhErE
      Too lazy to set a custom title
      • Sep 2005
      • 10583

      #3
      That will work just fine.

      If you're building for long-term durability, try looking into PHP frameworks like Symfony/Laravel. It's a bit of a learning curve, but at least you'll have a solid foundation for your code when it comes time to update it.
      skype: lordofthecameltoe

      Comment

      • mopek1
        Confirmed User
        • Jun 2004
        • 3192

        #4
        Originally posted by WiredGuy
        I still do this with Perl... old school for life
        WG
        I still wish for Windows XP to be current. Simple with everything I needed.

        Comment

        • plsureking
          bored
          • Aug 2003
          • 4904

          #5
          Originally posted by mopek1
          I still wish for Windows XP to be current. Simple with everything I needed.
          i just stopped using Win7 last year

          one note about includes. if they are called cross-domain, name them .inc not .php. otherwise the script will try to process it instead of include it.

          #
          PornCMS / low cost paysite management with hosting

          Comment

          • 2MuchMark
            Mark of 2Much.net
            • Aug 2004
            • 50971

            #6
            Originally posted by mopek1
            If I build a php website and use code like this:

            <?php include 'includes/navbar.php';?>

            ... so that when I want to make a change in the navbar across thousands of pages, the entire site is updated by changing one file only in the /includes folder.

            Is that current or is everyone onto a different version of php, or different code etc...?

            If I build a new site I want it to be able to adapt to any future change without having to individually change each page (or worse, rebuild the site) which would take forever.

            Thanks.
            Yes, and doing it this way makes it really easy to keep all of the pages of your site consistent. I use includes for the nav bar / menus, footers, and most of the header. It saves a ton of time too.

            Comment

            • Klen
              • Aug 2006
              • 32235

              #7
              Originally posted by mopek1
              I still wish for Windows XP to be current. Simple with everything I needed.
              I would pay good money for winxp version which would be exactly same but with updated driver database.

              Comment

              • ravo
                Confirmed User
                • Jun 2001
                • 5461

                #8
                Originally posted by WiredGuy
                I still do this with Perl... old school for life
                WG
                +1
                I think you and I are the only ones still using Perl. lol
                AdultAdBroker - Buy and Sell Your Flat Rate Banners, Links, Tabs, Pops, Email Clicks and Members' Area Traffic - updated May 2026

                Comment

                • Klen
                  • Aug 2006
                  • 32235

                  #9
                  Originally posted by ravo
                  +1
                  I think you and I are the only ones still using Perl. lol
                  Anyone remember UBB board which was based on perl?

                  Comment

                  • WiredGuy
                    Pounding Googlebot
                    • Aug 2002
                    • 34512

                    #10
                    Originally posted by ravo
                    +1
                    I think you and I are the only ones still using Perl. lol
                    The internet hit a plateau with Perl
                    WG
                    I play with Google.

                    Comment

                    Working...