Tutorial for reducing HTML file size using PHP echo's available?

CPANathan

Elite Member
Joined
Jul 9, 2019
Messages
2,858
Reaction score
10,305
I've gotten really good with my front end web development over the past few months and I'm looking to further improve my work/optimize it's load speed by taking up PHP.

If my HTML/Bootstrap is set up "perfectly", is there a video or article that can walk me through clearing up some space with PHP?
 
I don't understand, what exactly are you trying to achieve?
 
I've gotten really good with my front end web development over the past few months and I'm looking to further improve my work/optimize it's load speed by taking up PHP.

If my HTML/Bootstrap is set up "perfectly", is there a video or article that can walk me through clearing up some space with PHP?
https://www.youtube.com/c/Freecodecamp

Try this they might have techniques tucked inside their long videos
 
I don't understand, what exactly are you trying to achieve?
less html more php

so as far as my knowledge goes I can create a theme in html and instead of having like 20 pages filled with html/css/bootstrap I can for example design one service or blog article, call it with some PHP and then figure out how to set each pages information...

Can someone put this into better words for me?

I found this:
 
Last edited:
You are probably looking for a PHP framework like Laravel
 
@Johnik I believe you're actually right bossman, I've got to try figure out how to turn this:

VrkGYqE

Into this:


Really not looking forward to this bit of self teaching, but it's next on the improvement list...
 
Raw HTML should be better, It’s static and you can cache. With PHP you will essentially just print and include html, so pretty much same thing, but a little bit slower. You don’t need that, that’s for dynamic websites, seems like your case are static files.Wouldn’t do it unless necessary.
See http://paul-m-jones.com/post/2010/10/27/comparing-benchmark-tools/
 
Last edited:
Raw HTML should be better, It’s static and you can cache. With PHP you will essentially just print and include html, so pretty much same thing, but a little bit slower. You don’t need that, that’s for dynamic websites, seems like your case are static files.Wouldn’t do it unless necessary.
See http://paul-m-jones.com/post/2010/10/27/comparing-benchmark-tools/
So you'd suggest just keeping everything to HTML?

My main reason for wanting preloaded front ends is that there's going to be a lot of services, articles, and portfolio pages up & I'd like an easier job adding, removing or editing those...
 
After messing around for a few hours I came to the realisation that Bootstrap is OP these days & PHP is just a head ache for rookies!

One services page, one portfolio page, and one blog have category(alone for now until I figure out more shenanigans) issues resolved by using this funky business for category set-up:

qwSdnT0

And with multiple of these:

bacLPF7

Resulting in some of theeeese: https://gyazo.com/3977d02388e6a0f9534025d836e90813

Would really love some pointers from the big heads, if possible! I feel like there's 10 better ways to do this.
 
If there were only few pages, then static(only HTML) will suffice.
But here, I'm guessing you need a dynamic sitepages.
You'll probably need to create backend interface and a database if you want to create/update/delete articles & portfolios.
Since your frontend is almost done, You could use PHP/Laravel for backend.
 
If there were only few pages, then static(only HTML) will suffice.
But here, I'm guessing you need a dynamic sitepages.
You'll probably need to create backend interface and a database if you want to create/update/delete articles & portfolios.
Since your frontend is almost done, You could use PHP/Laravel for backend.
Front end just has content left then on to new shenanigans...

@osdiablo do you think the YouTube video I sent earlier will send me on the right track?
 
Front end just has content left then on to new shenanigans...

@osdiablo do you think the YouTube video I sent earlier will send me on the right track?
I don't think just integrating would be enough. It wont give you abilities to add/edit anything unless you change from your html source code itself.
What are your requirements here?
Do you have a need to add multiple portfolios and also to edit/delete them?
Will you be adding articles/blog here?
Do you have experience in PHP?
 
I don't think just integrating would be enough. It wont give you abilities to add/edit anything unless you change from your html source code itself.
My goals are to expand my knowledge in programming to be honest mate, I've got understanding of pretty much everything just not the direction to study in!

So, I had a website once where I could add withdrawal options from a panel, behind the scenes. I could set the withdrawal option, its price, its graphic & so on...
I'm trying to expand on that and set up a panel to upload, edit or remove an article, service or portfolio item.

So the website I've built over the past few days is to draw attention to my BHW friends services. I'll be running campaigns, uploading articles, adding/modifying services to suit my friends needs & so on...

My life is a shit show so I'm prepared for this to go seven wrong ways before I get to the stage I need to be, I love it.

-----

And to reply to the quoted message, I agree with you now. I'm sure I should leave this to a friend instead of messing up a fairly perfectly built front end.

Appreciate your replies buddy, roast me!
 
I forgot to mention in the last post that the same script, all in PHP, was able to load in my front end from one file & reduce the amount of code per HTML file all round with that.

I'm sure it copied/displayed my header, navbar, page layouts & footers with different commands... This is sort of my goal.
Really PHP just interests me.
 
I forgot to mention in the last post that the same script, all in PHP, was able to load in my front end from one file & reduce the amount of code per HTML file all round with that.

I'm sure it copied/displayed my header, navbar, page layouts & footers with different commands... This is sort of my goal.
Really PHP just interests me.
That's cool. You could start by learning one step at a time.
If you're using laravel as the vid above, then next step would be to start learning CRUD operation for your articles/services..
 
That's cool. You could start by learning one step at a time.
If you're using laravel as the vid above, then next step would be to start learning CRUD operation for your articles/services..
You're a star buddy, get those message numbers up. Teachers go far here.

Going to look into those now. <3
 
Don't jump into Laravel if you don't know object-oriented PHP.

I forgot to mention in the last post that the same script, all in PHP, was able to load in my front end from one file & reduce the amount of code per HTML file all round with that.

I'm sure it copied/displayed my header, navbar, page layouts & footers with different commands... This is sort of my goal.
Really PHP just interests me.
You can include code from other files in plain PHP like so: <?php include 'navigation.php'; ?>.

The Gyzao gif you sent doesn't seem to need any PHP at all. If all you want to do is display your services and send users to another page when they click them, creating a backend is overkill.
 
Don't jump into Laravel if you don't know object-oriented PHP.


You can include code from other files in plain PHP like so: <?php include 'navigation.php'; ?>.

The Gyzao gif you sent doesn't seem to need any PHP at all. If all you want to do is display your services and send users to another page when they click them, creating a backend is overkill.
Creating a backend is next step bro. :(

I'll look into object-oriented now bossman, thank you.
 
I've gotten really good with my front end web development over the past few months and I'm looking to further improve my work/optimize it's load speed by taking up PHP.

If my HTML/Bootstrap is set up "perfectly", is there a video or article that can walk me through clearing up some space with PHP?
What exactly do you want to do? Speed up the site?
If so, there are quite a few services where you can check what errors you need to fix to speed up the site.
 
Back
Top