Home>
I am creating a site that generates passwords for PHP practice
I added an error code to see if the number of digits is a natural number or whether it exists or not.
Thank you
{
"resource": "/c:/xampp/htdocs/password/password.php",
"owner": "_generated_diagnostic_collection_name_ # 3",
"code": "undefined",
"severity": 8,
"message": "syntax error, unexpected ';'",
"startLineNumber": 39,
"startColumn": 29,
"endLineNumber": 39,
"endColumn": 1.7976931348623157e + 308
}
{
"resource": "/c:/xampp/htdocs/password/password.php",
"owner": "_generated_diagnostic_collection_name_ # 0",
"code": "undefined",
"severity": 8,
"message": "'}' expected.",
"source": "php",
"startLineNumber": 39,
"startColumn": 72,
"endLineNumber": 39,
"endColumn": 72
}
{
"resource": "/c:/xampp/htdocs/password/password.php",
"owner": "_generated_diagnostic_collection_name_ # 0",
"code": "undefined",
"severity": 8,
"message": "Unexpected 'else'",
"source": "php",
"startLineNumber": 43,
"startColumn": 23,
"endLineNumber": 43,
"endColumn": 23
}
{
"resource": "/c:/xampp/htdocs/password/password.php",
"owner": "_generated_diagnostic_collection_name_ # 0",
"code": "undefined",
"severity": 8,
"message": "Unexpected '}'",
"source": "php",
"startLineNumber": 48,
"startColumn": 17,
"endLineNumber": 48,
"endColumn": 17
}
Applicable source code
<? php
function sizensuu ($val) {
return ctype_digit (filter_var ($val));
}
for ($x = 1;$x<= $_GET ['KOSUU'];$x + = 1) {
if ($_GET ['KETA']<= 9999999) {
if (sizensuu ($_ GET ['KETA']) == true) {
$MOJI = array ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', ' b ',' c ',' d ',' e ',' f ',' g ',' h ',' i ',' j ',' k ',' l ',' m ',' n ' , 'o', 'p', 'q', 'r', 's',' t ',' u ',' v ',' w ',' x ',' y ',' z ',' A ',' B ',' C ',' D ',' E ',' F ',' G ',' H ',' I ',' J ',' K ',' L ',' M ' , 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', ' Z ');
$password = $MOJI [rand (0, 61)];
for ($i = 2;$i<= $_GET ['KETA'];$i ++) {
$password = $password. $MOJI [rand (0, 61)];
}
print ("<textarea>");
print ($password);
print ("</textarea>");
} elif (isset ($_ GET ['KETA'])) {
print ("Please enter the number of digits");
} else {
print ("Please specify the number of digits as a natural number");
}
} else {
print ($_GET ['KETA']. "The digit is too big");
print ("<br>");
print ("Maximum number of digits, up to 9999999");
}
}
?>
Tried
I checked it myself but didn't understand the cause
Supplemental information (FW/tool version etc.)PHP7
Windows10 1803
Xampp latest version
-
Answer # 1
Related articles
- json - build error while creating latex environment with vs code
- php - address to brackets "an error occurred while loading preferences"
- php - please tell me how to resolve the error that occurred while editing the wordpress theme
- php: there is an error in the insert into line and it cannot be resolved
- how to change php memory while phpini cannot be changed (apache server)
- [php/xampp] an error occurs when setting the include path
- [php/mysql] sql syntax error of sqlstate [42000] occurs
- php - ec-cube 405 error in self-made command (cron) in prod environment
- when i upgraded the php spreadsheet, i got an error
- ruby - http error 500 error occurred in aws deployment, but the cause cannot be determined
- php - 404 not found nginx/1135 error resolution
- php - vlaravel form request does not show error statement
- php - [wp] an error is displayed in the item part added to the user information in advanced custom field
- error occurred in postgresql trigger function and stored procedure
- creating an associative array using php and variable names as keys
- php parse error: syntax error, unexpected'class' (t_class) error
- ruby - an error occurred when implementing the micropost search function using ransack
- white screen while building management screen function with cakephp4
- php - "doesn't have a default value" error when performing seeding
- php - an error that i personally cannot solve
Related questions
- Cannot specify the link destination with an absolute path in PHP
- php does not work on the browser
- php - i want to do laravel's "hello world!" with xampp
- php - i can't sync with rsync from the browser
- apache won't start&i don't know the cause
- php - unable to connect to apache
- php - how to set up a server for ratchet "web socket" (under sakura's vps environment) implementation
- php - can't the $_post array be assigned to a variable?
- php - xampp error cannot be resolved with m1 mac book pro
- apache settings about submitting php forms
Elif instead of elif