русский
Germany.ruForen → Архив Досок→ Programmierung

Python & MySql

05.10.18 16:37
Re: Python & MySql
 
  moose старожил
in Antwort MrSanders 05.10.18 16:23, Zuletzt geändert 05.10.18 16:39 (moose)

а я прочитал, что можно так:

помещаем в корень файл index.php:

<!--filtered-->
<!--filtered-->
    <!--filtered-->
        <!--filtered-->";
            $command= escapeshellcmd('/usr/bin/python/python test0.py');
            $output = shell_exec($command);
            echo $output;
            echo "bye PHP";
        ?>
    <!--filtered-->
<!--filtered-->


и здесь же лежит файл test0.py

#!/usr/bin/env python
print 'here python'

но вижу только

hi php

bye php

правда, mod test0.py 644, и я не знаю, как его поменять без ssh : (

oops!!! отфильтровало часть тэгов. но смысл понятен, думаю.
 

Sprung zu