21308 Posts in 5737 Topics by 2603 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1119 Views |
-
[SOLVED]Pages_Controller::require_once() Failed opening required

10 February 2009 at 6:21am Last edited: 10 February 2009 6:26am
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"); } -
Re: [SOLVED]Pages_Controller::require_once() Failed opening required

10 February 2009 at 6:27am
I solve in this way:
require_once(Director::baseFolder() .'/assets/resize.php');
| 1119 Views | ||
|
Page:
1
|
Go to Top |

