Run Python Script on WordPress Website
This issue of permission denied is resolved.. Permission was already given but I have added ‘env python’ in the popen function.. Now the code is running as expected.. add_shortcode( ‘run_test_py’, ‘test_py’ ); function test_py( $attributes ) { $data = shortcode_atts( [ ‘file’ => ‘test.py’ ], $attributes ); $handle = popen(‘env python ‘. __DIR__ . “https://wordpress.stackexchange.com/” … Read more