我有以下代码。
'mysql' => [
'driver' => env('DB_CONNECTION'),
'host' => env('DB_HOST'),
'port' => env('DB_PORT'),
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
],
'mysql2' => [
'driver' => env('DB_CONNECTION_SECOND'),
'host' => env('DB_HOST_SECOND'),
'port' => env('DB_PORT_SECOND'),
'database' => env('DB_DATABASE_SECOND'),
'username' => env('DB_USERNAME_SECOND'),
'password' => env('DB_PASSWORD_SECOND'),
],
代码应提示输入名称,然后显示它。它正确提示,但不显示结果。
答案 0 :(得分:1)
如果你学习example1,你会发现你需要的一切以及更多 How buffered input works
代码应提示输入名称,然后显示它。它正确提示,但不显示结果。
链接帖子中的示例就是这样。
答案 1 :(得分:0)
.model small
.stack 100h
.data
msg db 10, 13, "this is a string $"
bufferSize db 21 ; 20 char + RETURN
inputLength db 0 ; number of read characters
buffer db 21 DUP("$") ; actual buffer
.code
main proc
mov ax, @data
mov ds, ax
lea dx, msg
mov ah, 09h ;output
int 21h
mov dx, offset bufferSize ; load our pointer to the beginning of the structure
mov ah, 10 ; GetLine function
int 21h
mov ax, @data
mov ds , ax
lea dx, buffer
mov ah, 09 ;output
int 21h
endp
end main