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)
-   -   Are php Includes considered current for website use Still? (https://gfy.com/showthread.php?t=1362071)

mopek1 02-20-2023 01:31 PM

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 02-20-2023 01:50 PM

I still do this with Perl... old school for life :)
WG

NoWhErE 02-20-2023 02:13 PM

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.

mopek1 02-20-2023 07:18 PM

Quote:

Originally Posted by WiredGuy (Post 23099709)
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.

plsureking 02-20-2023 08:06 PM

Quote:

Originally Posted by mopek1 (Post 23099815)
I still wish for Windows XP to be current. Simple with everything I needed.

i just stopped using Win7 last year :1orglaugh

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.

#

2MuchMark 02-20-2023 09:51 PM

Quote:

Originally Posted by mopek1 (Post 23099694)
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.

Klen 02-21-2023 05:34 AM

Quote:

Originally Posted by mopek1 (Post 23099815)
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.

ravo 02-21-2023 06:15 AM

Quote:

Originally Posted by WiredGuy (Post 23099709)
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

Klen 02-21-2023 06:21 AM

Quote:

Originally Posted by ravo (Post 23099973)
+1
I think you and I are the only ones still using Perl. lol

Anyone remember UBB board which was based on perl?

WiredGuy 02-21-2023 06:41 AM

Quote:

Originally Posted by ravo (Post 23099973)
+1
I think you and I are the only ones still using Perl. lol

The internet hit a plateau with Perl :)
WG


All times are GMT -7. The time now is 11:31 PM.

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