Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php PMySQL中的占位符_Php_Javascript_Sqlite_Mysqli_Sql Injection - Fatal编程技术网

Php PMySQL中的占位符

Php PMySQL中的占位符,php,javascript,sqlite,mysqli,sql-injection,Php,Javascript,Sqlite,Mysqli,Sql Injection,我看到了一个JavaScript-SQLite代码 transaction.executeSql('INSERT INTO files (name, filedata_id) VALUES (?, ?);', [ '"+name+"', results.insertId], nullDataHandler, killTransaction); 在PHP-MySQL中,这些占位符是否有对应的占位符可以实现同样的效果并防止SQL注入?是的,请参阅。但是,您仍然应该验证用户输

我看到了一个JavaScript-SQLite代码

    transaction.executeSql('INSERT INTO files (name, filedata_id) VALUES (?, ?);', [         '"+name+"', results.insertId], nullDataHandler, killTransaction);

在PHP-MySQL中,这些占位符是否有对应的占位符可以实现同样的效果并防止SQL注入?

是的,请参阅。但是,您仍然应该验证用户输入。

要查找的关键字是“prepared statements”。什么是PMysql,您使用的是什么数据库?标记的选择似乎很不相关SQLite是数据库的名称