GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Before I spend an hour fucking around with this... (https://gfy.com/showthread.php?t=1360001)

Publisher Bucks 12-09-2022 10:35 PM

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
Quote:

$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:

Quote:

<?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.

plsureking 12-09-2022 10:45 PM

waste the boards time instead of your own? makes sense :thumbsup

#

LaSexorcisto 12-09-2022 11:35 PM

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.

plsureking 12-10-2022 12:48 AM

Quote:

Originally Posted by LaSexorcisto (Post 23071090)
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.

:1orglaugh:thumbsup true

#

plsureking 12-10-2022 12:52 AM

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

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

:2 cents:

#

CurrentlySober 12-10-2022 08:34 AM

Quote:

Originally Posted by plsureking (Post 23071104)
i can't believe you aren't up to OOP yet...

is that like a backwards poo?

plsureking 12-10-2022 09:32 AM

Quote:

Originally Posted by CurrentlySober (Post 23071160)
is that like a backwards poo?

:1orglaugh:1orglaugh

#

k0nr4d 12-10-2022 10:32 AM

Quote:

Originally Posted by CurrentlySober (Post 23071160)
is that like a backwards poo?

That's...surprisingly accurate :1orglaugh

plsureking 12-11-2022 04:02 AM

Quote:

Originally Posted by k0nr4d (Post 23071185)
That's...surprisingly accurate :1orglaugh

:1orglaugh:1orglaugh

#

MelkieWey 12-11-2022 08:31 PM

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!

Quote:

<ul>
<li>poo</li>
<li>shit</li>
<li>scat</li>
<li>excrement</li>
<li>diarrea</li>
<li>scheiße</li>
</ul>
Quote:

<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!

MelkieWey 12-11-2022 08:36 PM

Quote:

Originally Posted by MelkieWey (Post 23071694)
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


All times are GMT -7. The time now is 09:14 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123