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 #177788 is a reply to message #177734] Sat, 21 April 2012 06:40 Go to previous messageGo to previous message
hipa is currently offline  hipa
Messages: 5
Registered: March 2012
Karma:
Junior Member
Op Wed, 18 Apr 2012 20:08:51 +0000, schreef Redcat:

> On Wed, 18 Apr 2012 20:03:40 +0000, hipa wrote:
>
>> Hi there
>>
>> 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?
>
> I'm not sure what you mean by "exclude the php code from the page". The
> code needs to be in the HTML file if it's going to execute. If you're
> worried about users being able to view your code, you needn't - the code
> won't get displayed to them, even if they do a "view source", if your
> web server is configured properly. The code will get executed on the
> server side when it's loaded, and will display to the user whatever
> output it's supposed to spit out.
>
> What are you hoping to accomplish?
>

Ok I explained it bad, and yes I'm not a php developer. Maybe just
starting...
I put the code to connect to the db in separate php file.
So I can include it wherever I want.

include 'opendb.php';

Also going to look at classes...
I did not know that the code is nog visible for users, thanks!
[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 13:24:52 GMT 2024

Total time taken to generate the page: 0.04201 seconds