Before I spend an hour fucking around with this...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Publisher Bucks
    Confirmed User
    • Oct 2018
    • 1339

    #1

    Tech Before I spend an hour fucking around with this...

    If i want to include a selection of arrays in an external file i just do this right?

    array.php
    $array1 = $row['1'];
    $array2 = $row['2'];
    $array3 = $row['3'];
    $array4 = $row['4'];
    Then just call it at the top of the page using an include like this:

    <?php include '../dir/to/array.php';?>
    Or is there more to it than that?

    Any easier ways to achieve what I want? I'm basically trying to (kind of) have a 'settings' file with site name, keywords and other random shit that I can just edit and upload once and forget about.
    Extreme Link List - v1.0
  • plsureking
    bored
    • Aug 2003
    • 4911

    #2
    waste the boards time instead of your own? makes sense

    #
    PornCMS / low cost paysite management with hosting

    Comment

    • LaSexorcisto
      Confirmed User
      • Mar 2022
      • 95

      #3
      It literally would've taken you less than half the time for you just to test it than to write a post asking about it. I am like 90% sure at this point you're just trolling with these questions.

      But just look below and some nitwit will eventually answer your question to continue the cycle.

      Comment

      • plsureking
        bored
        • Aug 2003
        • 4911

        #4
        Originally posted by LaSexorcisto
        It literally would've taken you less than half the time for you just to test it than to write a post asking about it. I am like 90% sure at this point you're just trolling with these questions.

        But just look below and some nitwit will eventually answer your question to continue the cycle.
        true

        #
        PornCMS / low cost paysite management with hosting

        Comment

        • plsureking
          bored
          • Aug 2003
          • 4911

          #5
          actually i just read the question and i can't believe you aren't up to OOP yet. how long you been at this?

          you dont have the chops to be a programmer. go do something else.



          #
          PornCMS / low cost paysite management with hosting

          Comment

          • CurrentlySober
            Too lazy to wipe my ass
            • Aug 2002
            • 38954

            #6
            Originally posted by plsureking
            i can't believe you aren't up to OOP yet...
            is that like a backwards poo?


            👁️ 👍️ 💩

            Comment

            • plsureking
              bored
              • Aug 2003
              • 4911

              #7
              Originally posted by CurrentlySober
              is that like a backwards poo?


              #
              PornCMS / low cost paysite management with hosting

              Comment

              • k0nr4d
                Confirmed User
                • Aug 2006
                • 9231

                #8
                Originally posted by CurrentlySober
                is that like a backwards poo?
                That's...surprisingly accurate
                Mechanical Bunny Media
                Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

                Comment

                • plsureking
                  bored
                  • Aug 2003
                  • 4911

                  #9
                  Originally posted by k0nr4d
                  That's...surprisingly accurate


                  #
                  PornCMS / low cost paysite management with hosting

                  Comment

                  • MelkieWey
                    Hypno Sissy
                    • May 2022
                    • 263

                    #10
                    im the nitwit to continue the cycle

                    external file with the <head>
                    <base href="https://gfy.com/" /><!--[if IE]></base><![endif]--> section? WHY?

                    instead of PHP use .phtml & javascript


                    unorderly list saved as phtml!

                    <ul>
                    <li>poo</li>
                    <li>shit</li>
                    <li>scat</li>
                    <li>excrement</li>
                    <li>diarrea</li>
                    <li>scheiße</li>
                    </ul>
                    <script>
                    //define location & files
                    const partials = {
                    shitlist: "./where/is/the/shitlist.phtml",
                    poolist:"./where/is/the/poolist.phtml",
                    }
                    //fetch the content of the files into constants
                    const fetchContent =async (section) => {
                    const contentPartial = await fetch(partials[section]);
                    const content = await contentPartial.text();
                    return content;
                    }
                    //loads section with fetched content
                    async funtion loadSection(section) {
                    const dom = document.getElementById(section);
                    const content = await fetchContent(section);
                    dom.innerHTML = content;
                    }
                    //loads sections from contants
                    async function main() {
                    await loadSection('shitlist');
                    await loadSection('poolist');
                    }
                    //final execution
                    (async function () {
                    await main();
                    })();
                    </script>

                    Melkanea showed off!

                    Comment

                    • MelkieWey
                      Hypno Sissy
                      • May 2022
                      • 263

                      #11
                      Originally posted by MelkieWey
                      external file with the <head>
                      <base href="https://gfy.com/" /><!--[if IE]></base><![endif]-->
                      <base href="https://gfy.com/" /><!--[if IE]></base><![endif]--> section? WHY?
                      this is what happens when something fuckes up or sometimes when i figure out some new way of doing shit

                      Comment

                      Working...