MADELINEPROTO电报库

时间:2017-09-29 15:30:18

标签: php python telegram-bot

我有一个项目,我需要使用Madelineproto库。我将它添加到我的项目并安装了需求。当我运行that.phpstorm的示例时,请告诉我一些方法的警告。它说它们不存在例如phone_login并给我一些错误。 我的代码是:

<?php

set_include_path(get_include_path().':'.realpath(dirname(__FILE__).'/MadelineProto‌Bot/'));
require 'MadelineProtoBot\MadelineProto\vendor\autoload.php';
$settings = ['app_info' => ['api_id' => ,... 'api_hash' => '...']];
$MadelineProto = new danog\MadelineProto\API($settings);

$MadelineProto->phone_login(readline('my phone '));
$authorization = $MadelineProto->complete_phone_login(readline('Enter the code you received: '));
if ($authorization['_'] === 'account.noPassword') {
    throw new \danog\MadelineProto\Exception('2FA is enabled but no password is set!');
}
if ($authorization['_'] === 'account.password') {
    $authorization = $MadelineProto->complete_2fa_login(readline('Please enter your password (hint '.$authorization['hint'].'): '));
}
if ($authorization['_'] === 'account.needSignup') {
    $authorization = $MadelineProto->complete_signup(readline('Please enter your first name: '), readline('Please enter your last name (can be empty): '));
}
我的错误是:

The system cannot find the path specified.
TL:             	Loading TL schemes...
TL:             	Parsing TL_mtproto_v1.json...
TL:             	Parsing TL_telegram_v71.tl...
TL:             	Parsing TL_secret.tl...
TL:             	Parsing TL_calls.tl...
TL:             	CRC32 mismatch (e8201c08, dbf948c1) for decryptedDataBlock#dbf948c1 random_id:long random_bytes:string flags:# voice_call_id:flags.2?int128 in_seq_no:flags.4?int out_seq_no:flags.4?int recent_received_mask:flags.5?int proto:flags.3?int extra:flags.1?string raw_data:flags.0?string = DecryptedDataBlock;
TL:             	CRC32 mismatch (d20a6f5c, cc0d0e76) for simpleDataBlock#cc0d0e76 random_id:long random_bytes:string raw_data:string = DecryptedDataBlock;
TL:             	Parsing TL_botAPI.tl...
DataCenter:     	Connecting to DC 2 (main server, ipv4, tcp_full)...
MTProto:        	Generating permanent authorization key for DC 2...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 2021549172368014511 = 1354357289 * 1492626199
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -2.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
MTProto:        	Generating temporary authorization key for DC 2...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 1609381759157002487 = 1153246261 * 1395523067
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -3.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
AuthKeyHandler: 	Binding authorization keys...
MsgIdHandler:   	WARNING: Given message id (6471222286461726721) is bigger than or equal to the current limit (6471222286461691905). Consider syncing your date.
AuthKeyHandler: 	Successfully binded temporary and permanent authorization keys.
MTProto:        	Writing client info (also executing help.getConfig)...
DataCenter:     	Connecting to DC 1 (main server, ipv4, tcp_full)...
DataCenter:     	Connecting to DC 3 (main server, ipv4, tcp_full)...
DataCenter:     	Connecting to DC 4 (main server, ipv4, tcp_full)...
DataCenter:     	Connecting to DC 4_media (main server, ipv4, tcp_full)...
DataCenter:     	Connecting to DC 5 (main server, ipv4, tcp_full)...
MTProto:        	Generating permanent authorization key for DC 1...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 2390132410249580153 = 1236738133 * 1932609941
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -3.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
MTProto:        	Generating temporary authorization key for DC 1...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 2485609313528822857 = 1314678271 * 1890659767
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -3.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
AuthKeyHandler: 	Binding authorization keys...
MsgIdHandler:   	WARNING: Given message id (6471222305437752321) is bigger than or equal to the current limit (6471222305437723649). Consider syncing your date.
AuthKeyHandler: 	Successfully binded temporary and permanent authorization keys.
MTProto:        	Writing client info (also executing help.getConfig)...
MTProto:        	Generating permanent authorization key for DC 3...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 2446110044213003813 = 1398754873 * 1748776781
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -2.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
MTProto:        	Generating temporary authorization key for DC 3...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 1811928749494917419 = 1100259529 * 1646819411
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -2.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
AuthKeyHandler: 	Binding authorization keys...
MsgIdHandler:   	WARNING: Given message id (6471222324051949569) is bigger than or equal to the current limit (6471222324051918849). Consider syncing your date.
AuthKeyHandler: 	Successfully binded temporary and permanent authorization keys.
MTProto:        	Writing client info (also executing help.getConfig)...
MTProto:        	Generating permanent authorization key for DC 4...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 1186368739405131613 = 1050788477 * 1129027169
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -2.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
MTProto:        	Generating temporary authorization key for DC 4...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 3561143225058167773 = 1821228947 * 1955351759
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -3.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
AuthKeyHandler: 	Binding authorization keys...
MsgIdHandler:   	WARNING: Given message id (6471222338731663361) is bigger than or equal to the current limit (6471222338731611137). Consider syncing your date.
AuthKeyHandler: 	Successfully binded temporary and permanent authorization keys.
MTProto:        	Writing client info (also executing help.getConfig)...
MTProto:        	Generating permanent authorization key for DC 5...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 1216519245172067611 = 1056665521 * 1151281291
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -3.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
MTProto:        	Generating temporary authorization key for DC 5...
AuthKeyHandler: 	Requesting pq
ResponseHandler: 	Trying to assign a response of type ResPQ to its request...
ResponseHandler: 	Does the request of return type ResPQ match?
ResponseHandler: 	Yes
'python' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Invalid syntax. Default option is not allowed more than '1' time(s).
Type "TIMEOUT /?" for usage.
AuthKeyHandler: 	Factorization 1912117467356741881 = 1323715451 * 1444507931
RSA:            	Encrypting with rsa key...
AuthKeyHandler: 	Starting Diffie Hellman key exchange
ResponseHandler: 	Trying to assign a response of type Server_DH_Params to its request...
ResponseHandler: 	Does the request of return type Server_DH_Params match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Server-client time delta = -2.0 s
AuthKeyHandler: 	Executing p/g checks (1/2)...
AuthKeyHandler: 	Executing p/g checks (2/2)...
AuthKeyHandler: 	Executing g check...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Generating b...
AuthKeyHandler: 	Generating g_b...
AuthKeyHandler: 	Executing g_a check (1/2)...
AuthKeyHandler: 	Executing g_a check (2/2)...
AuthKeyHandler: 	Executing g_b check...
AuthKeyHandler: 	Preparing client_DH_inner_data...
AuthKeyHandler: 	Executing set_client_DH_params...
ResponseHandler: 	Trying to assign a response of type Set_client_DH_params_answer to its request...
ResponseHandler: 	Does the request of return type Set_client_DH_params_answer match?
ResponseHandler: 	Yes
AuthKeyHandler: 	Generating authorization key...
AuthKeyHandler: 	Diffie Hellman key exchange processed successfully!
AuthKeyHandler: 	Auth key generated
AuthKeyHandler: 	Binding authorization keys...
MsgIdHandler:   	WARNING: Given message id (6471222354387831809) is bigger than or equal to the current limit (6471222354387735553). Consider syncing your date.
AuthKeyHandler: 	Successfully binded temporary and permanent authorization keys.
MTProto:        	Writing client info (also executing help.getConfig)...
MTProto:        	Updated config!
MTProto:        	{
    "_": "config",
    "date": 1506698850,
    "expires": 1506702636,
    "test_mode": false,
    "this_dc": 2,
    "chat_size_max": 200,
    "megagroup_size_max": 20000,
    "forwarded_count_max": 100,
    "online_update_period_ms": 120000,
    "offline_blur_timeout_ms": 5000,
    "offline_idle_timeout_ms": 30000,
    "online_cloud_timeout_ms": 300000,
    "notify_cloud_delay_ms": 30000,
    "notify_default_delay_ms": 1500,
    "chat_big_size": 10,
    "push_chat_period_ms": 60000,
    "push_chat_limit": 2,
    "saved_gifs_limit": 200,
    "edit_time_limit": 172800,
    "rating_e_decay": 2419200,
    "stickers_recent_limit": 30,
    "stickers_faved_limit": 5,
    "pinned_dialogs_count_max": 5,
    "phonecalls_enabled": false,
    "call_receive_timeout_ms": 20000,
    "call_ring_timeout_ms": 90000,
    "call_connect_timeout_ms": 30000,
    "call_packet_timeout_ms": 10000,
    "me_url_prefix": "https://t.me/",
    "disabled_features": []
}
MTProto:        	We're in IR, current dc is 2, nearest dc is 4.
API:            	Running APIFactory...
API:            	MadelineProto is ready!

Fatal error: Uncaught Error: Call to undefined function readline() in C:\wamp\s12\ee.php:8
Stack trace:
#0 {main}
  thrown in C:\wamp\s12\ee.php on line 8

Process finished with exit code 255

我该怎么办?

1 个答案:

答案 0 :(得分:0)

只需用它来模拟它

if (!function_exists("readline")) {
    function readline($prompt = null){
        if ($prompt) {
            echo $prompt;
        }
        $fp = fopen("php://stdin","r");
        $line = rtrim(fgets($fp, 1024));
        return $line;
    }
}

您可以参考其他问题:Call to undefined function readline