FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Help with my website
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Help with my website [message #172204] Fri, 04 February 2011 00:59 Go to next message
Geoldr is currently offline  Geoldr
Messages: 1
Registered: February 2011
Karma: 0
Junior Member
Hi, so I am creating a website, but I would like my website to be
skinnable. So for example, if i wanted to display the news, I would
just have to type in get_news(); which the program would get from
another file for the functions. So the main files that display
information wouldnt actually have much code in them. I am having
trouble with this, the only way I found I can do this is if I use
global variables, but that's not very good. I am trying to figure out
a way to use classes. Any help on this would be much appreciated.
Re: Help with my website [message #172207 is a reply to message #172204] Fri, 04 February 2011 09:37 Go to previous messageGo to next message
Rahul Sinha is currently offline  Rahul Sinha
Messages: 1
Registered: February 2011
Karma: 0
Junior Member
On Feb 4, 5:59 am, Geoldr <geo...@gmail.com> wrote:
> Hi, so I am creating a website, but I would like my website to be
> skinnable. So for example, if i wanted to display the news, I would
> just have to type in get_news(); which the program would get from
> another file for the functions. So the main files that display
> information wouldnt actually have much code in them. I am having
> trouble with this, the only way I found I can do this is if I use
> global variables, but that's not very good. I am trying to figure out
> a way to use classes. Any help on this would be much appreciated.

Hi there ..

Probably you have to make use of MVC pattern for your web app.
You can make use of any open source fwk or else you have to create
your own.

Regards,
Rahul
Re: Help with my website [message #172212 is a reply to message #172204] Fri, 04 February 2011 15:18 Go to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
.oO(Geoldr)

> Hi, so I am creating a website, but I would like my website to be
> skinnable. So for example, if i wanted to display the news, I would
> just have to type in get_news(); which the program would get from
> another file for the functions. So the main files that display
> information wouldnt actually have much code in them. I am having
> trouble with this

In what way?

You write your news-polling function, put it in an include file, include
that on the main page and call the function there if necessary. So where
exactly is your problem? What have you tried so far?

Micha
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: json and non UTF8
Next Topic: pass variable in php construct
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 07:51:43 GMT 2024

Total time taken to generate the page: 0.06994 seconds