Sunday, 15 January 2012

I can't redirect output of a python file from a php call -


I am trying to execute a Python file with php, in Python file I have this:

  imported pipes from imported pipes, popin names = sys.argv [1]; Print Name DEM CMDline (Command): Process = Popin (Args = Command, Standout = PPE, Shell = True) Return Process. Comunicate () [0] CMDline ("NMAP xxxx -OX sortida.exml")  

When I execute python pythonfile.py , sortida. Creates an xml file, but when calling y to php, do not create a sortida.xml file, only shows me print

PHP:

  system (' Dragon /var/www/core/un.py q ');  

Thanks in advance


No comments:

Post a Comment