helmut2509 Posted April 11, 2018 Share Posted April 11, 2018 In my PW app I have now a php script which caters to the upload of files. It does not directly belong to the UI and therefore I did not store it in the templates folder, but in a custom folder. My question is: how do I get access from this script to the Pw API? Can I leave it in the custom folder? Link to comment Share on other sites More sharing options...
louisstephens Posted April 11, 2018 Share Posted April 11, 2018 It just so happens that you can bootstrap processwire into scripts. I have used this several times and it is just one of the many awesome features. https://processwire.com/api/include/ Normally, I house specials scripts outside the template folder (like you have done) and just include processwire's index like: <?php include("/path/to/processwire/index.php"); ?> 4 Link to comment Share on other sites More sharing options...
helmut2509 Posted April 11, 2018 Author Share Posted April 11, 2018 7 minutes ago, louisstephens said: It just so happens that you can bootstrap processwire into scripts. I have used this several times and it is just one of the many awesome features. https://processwire.com/api/include/ Normally, I house specials scripts outside the template folder (like you have done) and just include processwire's index like: <?php include("/path/to/processwire/index.php"); ?> thanks for the tip. In my google search result the above link did not appear ;-(( Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now