Sign Up Login Videos
0

PHP and Multi-language support

0

PHP and Multi-language support

How can I make Multi-language support in PHP project?

  • PHP
  • Other

3 Replies

Do you mean, how can you use PHP and Python (or some other language) in the same project?

2

Do you mean, how can you use PHP and Python (or some other language) in the same project?

I know you can use languages like Python and C++ behind PHP. For example you can implement you're business logics in them.

For example you can create a REST API in PHP and access a Python function using exec() function. Here is a small demo

Lets say you are creating a REST API in PHP with Python in background. Increate_user.php":

<?php
$username = $_POST['username'];
$password = $_POST['password'];
exec("python3 createuser.py ")
?>

In createuser.py you can implementation the logic for creating a user

For reference exec() function refer the official docs of PHP

≪ Show more ≫
1

I know you can use languages like Python and C++ behind PHP. For example you can implement you're business logics in them.

For example you can create a REST API in PHP and access a Python function using exec() function. Here is a small demo

Lets say you are creating a REST API in PHP with Python in background. Increate_user.php":

<?php
$username = $_POST['username'];
$password = $_POST['password'];
exec("python3 createuser.py ")
?>

In createuser.py you can implementation the logic for creating a user

For reference exec() function refer the official docs of PHP

≪ Show more ≫
0

Thanks.

0

Thanks.

x