I know a lot about python but I don’t know all the aspect to php would it be possible to run python and have it out put code to php then to nginx and then to the client. Now I do realize that this is somewhat counter productive (so please do not post about how this is a bad idea) but I was just curious if this was possible at all…?
Share
Thanks to Cole Johnson I remembered that you can just call php after writing to the dynamic.php file and retrieving the output using
subprocessthen send the returned code to nginx to the client (yes this may be about twice the time) but if you are looking for a super secure way of running php code this might be an idea. Have python parse the code before running it so all calls that are not “in legal” legal being a list will be commented out or returned as an error.