دلیل 'php' is not recognized در code runner

پرسیده شده
فعالیت 1118 روز پیش
دیده شده 514 بار
0

با سلام خدمت اساتید محترم 

برای ایجاد یک دیتابیس در داخل پی اچ پی در قسمت code runner به این مشکل برخوردم :

 

[Running] php "c:\xampp\htdocs\PHP-EXPERT-BASIC\پروژه های دوره ی 13\02-mysqli\index.php"
'php' is not recognized as an internal or external command,
operable program or batch file.

[Done] exited with code=1 in 0.068 seconds

 

لطفا راهنمایی کنید

 

 

 

کدها هم به این صورته :

 

<?php

$mysqli = new mysqli("localhost","root","","world");

if($mysqli -> connect_errno){
    echo "Filed to Connect to Mysql . Error: ". $mysqli-> connect_error;
    exit;
}

echo "Successfully Connected to Mysql";
فایل پیوست

میلاد رئوف
میلاد رئوف

19 فروردین 00

0
حذف شده

مشکل vscod رو تونستم حل کنم ولی الان داخل windows power shell با این مشکل مواجه میشم :

 

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Milad> mysql -h localhost -u root -p
mysql : The term 'mysql' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ mysql -h localhost -u root -p
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (mysql:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
فایل پیوست

میلاد رئوف

توسط

میلاد رئوف

19 فروردین 00

1
حذف شده

سلام  و احترام

این دستور رو توی cmd وارد کنید و یه بار دیگه امتحان کنید

set path=%PATH%;D:\xampp\mysql\bin;

 

فایل پیوست

امیر صالحی

توسط

امیر صالحی

19 فروردین 00

حذف شده
با سلام آدرس پوشه ی bin مربوط به xampp سیستم رو به path های سیستم اضافه کردم و این مشکل کامل حل شد این آدرس : C:\xampp\mysql\bin رو در این قسمت : control panel > system > Advansed system settings > Environdment variables > User variables > path > new اضافه کردم
میلاد رئوف

20 فروردین 00