There is no output result and no error message.
X
X 2018-04-15 15:56:54
0
5
1817

It seems that I encountered the same problem as above? Tested in PHPstudy, the information is as follows. I checked phpinfo and found that pdo is enabled. What problem did this encounter? 配置文件.png插入数据文件.png表结构.png

X
X

reply all(4)
lcy

Let me answer, the solution is simple! ! ! ! ! I was also troubled for more than half an hour, and I was so irritated that I finally found the problem!

First of all, let me state the problem: the webpage did not report an error after running! There is nothing, it is blank.

The reason is the capitalization problem of letters! There's really no way around this, it's such a huge pitfall! !

So here is the solution below!

Source code: $dsn="{$dbType}:host={$host};dbName={$dbName}";

The N in the dbName in the code cannot be capitalized, it must be Lowercase! ! ! The correct code is as follows! ! Hey, this mistake is more annoying than a punctuation mark! ! I hope this problem can be avoided in the future!

After correction: $dsn="{$dbType}:host={$host};dbname={$dbName}";

胡胡

Same for me, var_dump($num); The result is boolean false
You can insert it by executing the sql statement directly in the database. php.ini expands normally.

外星人

mine too

青风百里

Check the table structure of your database

屏幕快照 2018-05-28 12.32.03.jpeg

  • reply Or not
    外星人 author 2018-12-18 21:23:56
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template