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

Home » Imported messages » comp.lang.php » php include, function, ...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: php include, function, ... [message #177789 is a reply to message #177737] Sat, 21 April 2012 06:46 Go to previous messageGo to previous message
hipa is currently offline  hipa
Messages: 5
Registered: March 2012
Karma:
Junior Member
Op Thu, 19 Apr 2012 02:55:47 +0200, schreef Thomas 'PointedEars' Lahn:

> hipa wrote:
>
>> I have a litle page with a form, which inserts an article in a postgres
>> db with php.
>> The php code is in the html page. Can someone tell me what the best way
>> is to exclude the php code from this page. And then just calling it
>> true a function or something?
>
> Rather obviously you cannot exclude "the php code" from "this page"
> unless "this page" should become static. However, you can move parts of
> the code into an include (file). You do not have to call a function,
> but it helps.

That is what I mean.

> Probably the best way to do this is not only to call a function, but
> construct an object as defined by a class, so that it can encapsulate
> data (like state) and functionality, and call methods of that object
> that implement this functionality, which may include the generation of
> HTML (in an MVC-based approach that would be the view's methods).

This is even more what I'm saying :-)

> Bottom line: RTFM.

Yes, I should more....
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Weird behaviour when adding values to associative arrays
Next Topic: Date/Time warning
Goto Forum:
  

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

Current Time: Thu Nov 07 15:22:56 GMT 2024

Total time taken to generate the page: 0.06194 seconds