Php - how to run python -
i'm getting error:
************************ exception: n5boost11filesystem316filesystem_errore boost::filesystem::create_directory: permission denied: "/.dogecoin" dogecoin in appinit() terminate called after throwing instance of 'boost::filesystem3::filesystem_error' what(): boost::filesystem::create_directory: permission denied: "/.dogecoin" aborted (core dumped)
this index.php:
<html><body><h1>it works!</h1> <p>this default web page server.</p> <p>the web server software running no content has been added, yet.</p> <?php echo '<p>hello world</p>'; $output = array(); echo shell_exec("python gennewadd.py 2>&1"); echo phpinfo(); ?> </body></html>
and heres gennewadd.py:
def gennewadd(): c = csv.writer(open("/home/dogecoin/bin/addresses.csv", "a"), quoting=csv.quote_all) os.system("/home/dogecoin/bin/dogecoind getnewaddress > /home/dogecoin/bin/temp_address.txt") temp = open("/home/dogecoin/bin/temp_address.txt") my_add = 'drandvledqhjc84drczflc2dnbredntuj4' adr = temp.read().strip(); c.writerow( [adr, my_add]) temp.close() print adr; return adr; gennewadd()
i'm trying run "gennewadd.py" php file , string returns in terminal.
Comments
Post a Comment