Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » [SOLVED]Pages_Controller::require_once() Failed opening required

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

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

Page: 1
Go to End
Author Topic: 1460 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    [SOLVED]Pages_Controller::require_once() Failed opening required Link to this post

    Hi!
    I need add an external php file. I don't knew where to add this file so I put in assets.
    then in my Page.php I try to recall in my function but I have this error:

    Page_Controller::require_once() [function.require]: Failed opening required 'assets/resize.php' (include_path='.;c:\php\pear;E:\_silverstripe_cms\prova\auth_openid\code;E:/_silverstripe_cms/prova/sapphire/parsers/') in E:\_silverstripe_cms\prova\mysite\code\Page.php on line 35

    class Page_Controller extends ContentController {
    function a()
    { require_once("assets/resize.php"); }

  • bebabeba
    Avatar
    Community Member
    192 Posts

    Re: [SOLVED]Pages_Controller::require_once() Failed opening required Link to this post

    I solve in this way:

    require_once(Director::baseFolder() .'/assets/resize.php');

    1460 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.