PHPUnit??Windows?μ????ü????
???????????? ???????[ 2016/1/15 15:28:43 ] ?????????????????? ???ù???
????????????????漰??php??????????php???????е???????????????????????PHPUnit??????php??PHPUnit?????????????????????PHPUnit????????????????????????????????ú?????????????
????????Windows 10 ????
????PHP?汾??PHP 5.5.12
???????????????WAMPSERVER 2.5
????PHPUnit?汾??PHPUnit 4.8
???????????PHPUnit
?????????PHPUnit?????????????????????汾????????????php 5.5?????????PHPUnit 4.8????? .phar ??????????????? phpunit.phar ??
?????????????????λ?á?????????????????????????????????£??? D:
epositoryCourseManagementmobile_api_test ??
??????? ?????? ????? ???? ????????? ????????? ????????? ?????? ????? ??? ?????????????? ???????? ?? ????????????棬??? PATH ???? ????? ??????? ;D:
epositoryCourseManagementmobile_api_test ????????????·??????phpunit.phar??·????????????????????????λ????????PHPUnit?????????????????phpunit.phar??·???2??????PHPUnit??
??????????????????????????php??????????????á???????? php.exe ?? E:softwarewampinphpphp5.5.12 ????????? PATH ??????? ;E:softwarewampinphpphp5.5.12 ??PS???????????????а??PHP??IDE????????????????????????????????????????????????
?????????? Win + R ??????cmd?????????????phpunit.phar??·???????? echo @php "%~dp0phpunit.phar" %* > phpunit.cmd ??????????????? phpunit --version ???????????????? PHPUnit x.y.z by Sebastian Bergmann and contributors. ???????ú??????????????? exit ???????????????飩?????????
???????????PHPUnit???в???
???????PHPUnit????????? ?? ????login.php?????λ???? D:
epositoryCourseManagementmobile_api ????????????汾?????????????2??????????????
<?php
error_reporting(0);
$workNumber = $_POST["login-user"];
$password = $_POST["login-password"];
$tableName = $_POST["ident"];
$con = mysqli_connect("localhost"?? "root"?? ""?? "teacher_class_system");
if (!$con) {
die('Could not connect: ' . mysql_error());
} else {
mysqli_query($con?? "SET NAMES utf8");
$result = mysqli_query($con?? "SELECT * FROM $tableName where workNumber = $workNumber and password = $password");
if (mysqli_num_rows($result) < 1) {
echo "false";
} else {
$result_arr = mysqli_fetch_assoc($result);
echo json_encode($result_arr?? JSON_UNESCAPED_UNICODE);
}
}
?>
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11