Answer the question
In order to leave comments, you need to log in
php and python encoding?
Hello everyone, the bottom line is, there is a script written in php that sends a variable to the python script, the python processes and returns the changed string.
PHP:
$search = $_POST["search"];
$search = shell_exec('hh.py ' . $search);
print($search);
import sys
import pymorphy2
result = "дерево"
print (result)
Answer the question
In order to leave comments, you need to log in
At the beginning of the script, write
In the script coderesult = u"дерево"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question