apache configuration for simple python run in kali linux through php script -


the problem:

how apache configuration simple python program run in kali linux through php script.

i tried shows blank window. php script:

<?php     $co = escapeshellcmd('/root/desktop/python1.py');     $op = shell_exec($co);     echo $op; ?> 

in var_dump shows null. me..

you want point shell program

<?php $co = escapeshellcmd('/bin/sh /root/desktop/python1.py'); $op = shell_exec($co); echo $op; ?> 

or use python self

$co = escapeshellcmd('/usr/bin/python /root/desktop/python1.py'); 

ps

when know command, escapeshell redundant, can use shell_exec directly

<?php  $op = shell_exec('/bin/bash /root/desktop/python1.py'); echo $op; ?> 

enter image description here


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -