helmut2509 Posted April 11, 2018 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?
louisstephens Posted April 11, 2018 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
helmut2509 Posted April 11, 2018 Author 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 ;-((
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