vendredi 22 juillet 2016

php exec function doesn't work correct

I'm using Python beside Laravel on my PC , I Have Installed Python . when I try to run a python code which is in a file via command line ( Windows ) , there is no problem , but when I attempt to run that file via :

exec("python ".__DIR__."new.py");

from my routes.php document , it returns 1
here is my document tree :

    C:.
│   Kernel.php
│   new.py
│   routes.php
│<br>
├───Controllers
│   │   clientController.php
│   │   Controller.php
│   │   HomeController.php
│   │   requestHandler.php
│   │
│   └───Auth
│           AuthController.php
│           PasswordController.php
│
├───Middleware
│       Authenticate.php
│       EncryptCookies.php
│       RedirectIfAuthenticated.php
│       VerifyCsrfToken.php
│
└───Requests
        Request.php

in addition this is .py file :

print("Hello World")



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire