| |

VerySource

 Forgot password?
 Register
Search
View: 1642|Reply: 9

Two PHP problems, who will solve it ~~~

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-17 17:00:02
| Show all posts |Read mode
Two questions
Question one
@#What is it
require_once (@ # conn.php@#);
session_start ();
$ username = $ _ POST [@ # username @ #];
$ password = $ _ POST [@ # password @ #];
$ exec = "select * from admin where username = @ #". $ username. "@ #";
 
Question two
. Represents a connector
But what do you mean here
if ($ gradnum> 0) {
for ($ i = 0; $ i <$ gradnum; $ i ++) {
$ forums ['li_add']. = '<ul>';
}
Reply

Use magic Report

0

Threads

12

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-4-20 21:15:01
| Show all posts
1. I don't know
2. $ forums ['li_add']. = '<Ul>'; equivalent to $ forums ['li_add'] = $ forums ['li_add']. '<Ul>';
Reply

Use magic Report

0

Threads

24

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-4-21 11:45:01
| Show all posts
1. It should be replaced ~~ Replace @ # with 'to restore!
2. Upstairs has already been said, equivalent to $ forums ['li_add'] = $ forums ['li_add']. '<Ul>';
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-27 18:00:02
| Show all posts
1 question
   Using @ # as single quotes' should prevent the program's url from invading. . However, it is unclear what line is running for replacement.

2 questions
   The final result is that $ forums ['li_add'] contains a string separated by <ul>

   If it is a 1-dimensional array, it can be compressed into a string separated by <ul>

   $ forums ['li_add'] = imploce ('<ul>', $ someSingleArray);
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-27 18:15:02
| Show all posts
It's implode, wrongly written ~~ sorry
Reply

Use magic Report

0

Threads

27

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-5-2 15:30:01
| Show all posts
1 I do n’t know, you did n’t give the full code

2 $ forums ['li_add'] = $ forums ['li_add']. '<Ul>';
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-5-3 21:45:01
| Show all posts
I compare dishes. . .
According to my observation, the role of @ is
No warning prompt is displayed when executing some potentially dangerous statements. . . .

I just cooked this comparison dish. . .
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-15 16:15:02
| Show all posts
It should not be as the upstairs said, @#成成 appears~ I am not clear
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-13 13:45:01
| Show all posts
1 @ is an error control character, and control errors are not output. # is a single-line comment symbol for *nix, and it can also be used as a single-line comment in PHP. However, @# appears together and has not been seen.
Can you run the program containing this code?

2 +=,.=This is a matching operator, someone explained the usage upstairs. It is also often used in other languages.
Reply

Use magic Report

0

Threads

2

Posts

1.00

Credits

Newbie

Rank: 1

Credits
1.00

 Vietnam

Post time: 2020-7-14 14:58:50
| Show all posts
edit by:
$exec="select * from admin where username='$username'";
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list