Hey there,
New to silverstripe and trying to import a file with fopen.
Is there a reason why I can't get this to work in silverstripe?
Cheers,
Jamie
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi Jamie Welcome to the Forums.
Do you get an error message when trying to use fopen? It is likely that may have got the path to the file to import open. The base path for SilverStripe is in sapphire/main.php so if you want to get into the mysite folder then you have to either go up a folder (../mysite) or use an absolute url would work.
Other reason could be that its a permissions issue trying to read it.
ahhh thanks again Willr,
I forgot SS sets the base path!