Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Call function from php file

Go to End

3 Posts   924 Views


Community Member, 130 Posts

6 August 2011 at 12:46am

Hi again Silverstripe community

I've been getting some help from a friend on something I'm trying but my friend has told me to call the function from the file he gave me.

Can someone tell me how to call the function from a php file in Silverstripe?


require_once "project.php";

project_recent_sidebar("myaccountnamehere",10,0,"left","Text Here",true,"top","",true);

Thanks :)


Community Member, 545 Posts

6 August 2011 at 6:53am

This one potentially really simple. Put the project.php into your mysite/code and do a dev/build?flush=all to rebuild the manifest. You may need to tweak the name of the file or the class in it to fit into the SS namespace. Then you don't even need to use require_once its just available.


Community Member, 130 Posts

17 August 2011 at 12:54am

Thanks zenmonkey :)