nginx.conf
upstream mysql_backend {
drizzle_server 127.0.0.1:3306 dbname=test password=123456 user=root protocol=mysql;
drizzle_keepalive max=200 overflow=reject;
}
location ~ '^/cat/(.*)' {
set $name $1;
set_quote_sql_str $quoted_name $name;
drizzle_query "select * from cats where name=$quoted_name";
drizzle_pass mysql_backend;
rds_json on;
}
use file_get_contents
var_dump(file_get_contents('http://localhost/cat/tom'));
or curl functions ?
Which better?