Launch python from specific exe in PHP
<p>I've a php file for launch my python file with default version (2.7):</p>

<pre><code>&lt;?php
    echo '&lt;pre&gt;';
    system("cmd /c D:\web\folder\easypy.py");
    echo '&lt;/pre&gt;';
?&gt;
</code></pre>

<p>But I developped a python file more strong who work with other python (3.5). So I need to use the exe of the version 3.5 in my php.</p>

<p>I tried this :</p>

<pre><code>&lt;?php
    echo '&lt;pre&gt;';
    system("cmd /c D:\web\folder\strongpy.py D:\folder1\folder2\python35\python.exe");
    echo '&lt;/pre&gt;';
?&gt;
</code></pre>

<p>But it not works.</p>

<p>system in php looks like this:</p>

<pre><code>system("command", $retval); //retval is optional
</code></pre>

<p>command in your case is:</p>

<pre><code> "cmd /c D:/folder1/folder2/python35/python.exe D:/web/folder/strongpy.py"
</code></pre>

<p>the final php code looks like this:</p>

<pre><code>system("cmd /c D:/folder1/folder2/python35/python.exe D:/web/folder/strongpy.py"); 
</code></pre>

php python cmd