Jump to content

Archived

This topic is now archived and is closed to further replies.

chai

Calling function from another file

Recommended Posts

Hi,

I am trying to write often-used code snippets such as add, edit,delete function and place them in
functions.php

So, whenever I need to use them, I can just call then up and pass parameters to them.

I am able to call a function that is inside the same page it is called.

But, how do I call a function that is in another file.

I've read about the include() function, but it doen't perform what I wanted.

Any ideas?

Share this post


Link to post
Share on other sites
include('functionScript.php');

//will include the function. then just call the function.

myFunction();

//maybe you can post some code
//so we can see why this isn't working.
//it should

Share this post


Link to post
Share on other sites
It is working now..
I was messing with the .ini file..don't know whether if this the cause :p

I am rather stuck in the session object though
going through tutorial as i am writing this..

Thanks.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.