26 Replies - 3113 Views - Last Post: 29 August 2011 - 05:53 PM
#1
advantages of using php instead of html
Posted 26 August 2011 - 09:56 PM
Replies To: advantages of using php instead of html
#2
Re: advantages of using php instead of html
Posted 26 August 2011 - 10:08 PM
How much of Php do you know?
This post has been edited by aaron1178: 26 August 2011 - 10:08 PM
#3
Re: advantages of using php instead of html
Posted 26 August 2011 - 10:21 PM
# Less Websites to manage
# Easier to maintain
Cons are:
# Slightly slower (Depending on the size of the website)
#4
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:07 AM

POPULAR
Anyway, if you have an existing base and would like to make it easier to update using PHP, you can quite simply split it out, on a first level, to use a header/footer.
I have a tutorial here which should help you out with the basics.
If you're not just looking to make your site easier to update, then what is the purpose? I mean, are you looking for some form of interactivity by adding PHP, orrrr?!
#5
Re: advantages of using php instead of html
Posted 27 August 2011 - 06:24 AM
I used a cms on a lot of my sites which i believe hindered my abilities
#6
Re: advantages of using php instead of html
Posted 27 August 2011 - 06:31 AM
If you're looking to make your site more dynamic you should first read a few PHP/MySQL tutorials and build a login system that's standalone from your website. When you're confident enough that you know how to build a reliable system, then think about adding it to your website.
#7
Re: advantages of using php instead of html
Posted 27 August 2011 - 03:55 PM
#8
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:26 PM
<?php
class template
{
public function headerT()
{
?>
All header html code here
<?php
}
}
?>
Something like that suits me to what I need
This post has been edited by aaron1178: 27 August 2011 - 05:27 PM
#9
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:40 PM
This post has been edited by macosxnerd101: 27 August 2011 - 05:48 PM
Reason for edit:: Added some clarification
#10
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:43 PM
macosxnerd101, on 27 August 2011 - 08:40 PM, said:
Each language has it's place. Just because they are in fact different langauges does not mean they are not meant to be used together.
How would you suggest using php to prepare html code for a users web browser if not mixed together?
#11
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:47 PM
Quote
I linked to CTphpnwb's tutorial for this. PHP will probably manipulate the HTML at some point, but cramming raw HTML into PHP files can get messy.
This would be messy:
<?php
...code..
?>
<html>
<head>
<title>
</title>
</head>
<body>
<?php
?>
</body>
</html>
Whereas using PHP to read the HTML files, manipulate the text, and output it at once in a more organized and controlled manner is better practice.
#12
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:51 PM
macosxnerd101, on 27 August 2011 - 08:47 PM, said:
Of course it will get messy. Man up & roll up your sleeves.
What language doesn't get messy? As long as the developer sticks to a readable syntax that they understand, there is no reason why the languages can't be mixed. A lot of tutorials on the internet show this style, & I've always found it to be perfectly acceptable. Again granted that the author/developer keeps to a proper syntax, indenting, & so on.
They are both web languages, I just don't agree that the author should strive to keep them separated, unless it's what they understand best.
I will read the link that you provided.
#13
Re: advantages of using php instead of html
Posted 27 August 2011 - 05:56 PM
#14
Re: advantages of using php instead of html
Posted 27 August 2011 - 06:21 PM
Look at this site, its engine 'IP board', they hardly use code separation, except for stuff like 'including css or javascript' ect. My point being, code separation 'is' good practice, but is not always necessary.
#15
Re: advantages of using php instead of html
Posted 27 August 2011 - 06:23 PM
|
|

New Topic/Question
Reply




MultiQuote







|