Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help Understanding PHP Please
Old 08-14-2007, 03:18 PM Help Understanding PHP Please
Junior Talker

Posts: 3
Name: Christey
Trades: 0
I've been doing basic webpages/sites for numerous years, but never really got away from basic html. So, now with the .asp and .php options, I'm not certain if perhaps I should start looking into changing my sites to a different format. Most, if not all, of my pages are .htm/.html, I really haven't taken the time to know the difference, so if someone wouldn't mind just giving me a brief explaination I would greatly appreciate the time! Thanks in advance.
PartyTeazer is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-14-2007, 03:21 PM Re: Help Understanding PHP Please
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
The difference is essentially in interaction. With a scripting language you can parse forms, interact with databases, create user sessions, etc. Other than that, the output is always pure HTML so if your current pages work as they are I would not change them just to be up on something new.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Old 08-14-2007, 03:26 PM Re: Help Understanding PHP Please
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I would add that the page extension changes nothing.
It's just to make a difference, and to reduce the server load.

For apache, for exemple, you can specify that the php engine should parse only file with .php, .php4, .php5 and .phtml and ignore every other extensions.
No need for the engine to parse a .css, if you don't ever put any php tags in it.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 08-15-2007, 10:47 AM Re: Help Understanding PHP Please
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
Quote:
Originally Posted by PartyTeazer
I've been doing basic webpages/sites for numerous years, but never really got away from basic html. So, now with the .asp and .php options, I'm not certain if perhaps I should start looking into changing my sites to a different format. Most, if not all, of my pages are .htm/.html, I really haven't taken the time to know the difference, so if someone wouldn't mind just giving me a brief explaination I would greatly appreciate the time! Thanks in advance.
It seems you are referencing to file extensions. Simply put, changing file extensions won't do much.

However, there are pretty straightforward reasons for using PHP on your sites.

If you want things to be done dynamically or automatically, then PHP is great for that.

For example, you may have a guestbook and people need to submit entries to you through e-mail and then you manually put them on the html page. With PHP you'll be able to parse a html form and put it in a database, then get the entries from the database so everything is automatically done for you.

Quote:
Originally Posted by tripy View Post
For exemple
example*

Quote:
Originally Posted by tripy
No need for the engine to parse a .css, if you don't ever put any php tags in it.
PHP in a CSS file? What?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 08-15-2007, 10:52 AM Re: Help Understanding PHP Please
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
example
Okay, my bad. Sorry for not being an located in an English speaking country and that I never had any English courses.
I'm much better in French...

Quote:
PHP in a CSS file? What?
Yep, you could do that. If you really would want it.
Imagine something like Myspace who allow user based CSS inserted into the pages. It could be separated to an CSS file, to keep the pages semantically clean (and I'm not talking about myspace here ).
That way, you could save the CSS in a db, and simply generate the css file on the fly when it's requested.

Never had to use it.
But, for exemple, it could be useful in a javascript file.
Don't you ever wished to have a DB connection available to fetch datas used in a .js file, without putting the whole javascript in your main page ?

You have 2 solutions for that:
First: enable the parsing of PHP tags into .js files (not recommended)
second: Do an include() of the js file into the main php file. The include() makes an evaluation of the PHP tags in the included files, even if the file have not a .php extention.
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 08-15-2007 at 10:55 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Help Understanding PHP Please
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28405 seconds with 12 queries