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
single page that user interacts with
Old 08-15-2011, 01:17 PM single page that user interacts with
Extreme Talker

Posts: 176
Trades: 0
it seems that a lot of sites and software, like forums and such, that run on php have just one page the the user actually goes to (index.php), and through this other php scripts are included depending on what's needed.

is there a name for this or anything? I just want to know a little more about it.
Skeddles is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-15-2011, 01:20 PM Re: single page that user interacts with
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
The site definitely has more pages, it could just be using AJAX to handle the requests. AJAX is basically a way to call PHP dynamically from Javascript.
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Old 08-15-2011, 01:33 PM Re: single page that user interacts with
Extreme Talker

Posts: 176
Trades: 0
Quote:
Originally Posted by Physicsguy View Post
The site definitely has more pages, it could just be using AJAX to handle the requests. AJAX is basically a way to call PHP dynamically from Javascript.
No It's definitely not just one page, it's many pages, but they use PHP includes ran from the first page. I was just wondering if this method had a name or reasons for using it or anything.
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 08-15-2011, 01:45 PM Re: single page that user interacts with
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
I'm not sure if there is a name for it; any site that uses a rewrite engine (ie mod_rewrite) does this to some degree. In WordPress for example, most requests outside of the admin UI are routed through index.php.

A URL is an input just like any other. You can choose to handle it however you want in your application.
__________________

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
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 08-15-2011, 02:08 PM Re: single page that user interacts with
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
You often see this for larger sites or frameworks (not because it isn't possible for smaller sites, but because for smaller sites you'd be putting more code and effort into the core of the site than the actual content). One can say that it enables one more level of dynamic programming (as oposed to static programming, which is just plain html). You can i.e. have entire pages stored in your database, rather than just small dynamic parts loaded into otherwise static pages, and have them loaded through the index page. That way you can add/edit/delete entire pages on your site dynamically, without having to add or modify anything in the core. This is probably the very base of most CMSs (Content Management Systems).

As a practical example, the CodeIgniter php framework uses this approach to dynamically load controllers and views (look into the MVC (Model-View-Control) pattern) through the index page, after having loaded and run it's own base routines.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 08-15-2011, 04:04 PM Re: single page that user interacts with
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's called "procedural coding" where one page simply calls procedures or functions that are defined in included files and outputs it to the user agent.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to single page that user interacts with
 

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.32638 seconds with 12 queries