با سلام خدمت اساتید محترم
برای ایجاد یک دیتابیس در داخل پی اچ پی در قسمت 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";
مشکل 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
سلام و احترام
این دستور رو توی cmd وارد کنید و یه بار دیگه امتحان کنید
set path=%PATH%;D:\xampp\mysql\bin;