php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用
server {
listen 80;
server_name www.kakaweb.com;
root "D:/phpstudy_pro/WWW/phalcon/public";
index index.php index.html error/index.html;
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9002;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}}
public function holdAction ()
{
$user = new User();
$phql = "INSERT INTO User (name, age, sex) VALUES (:name:, :age:, :sex:)";
$status = $user->modelsManager->executeQuery($phql, array(
'name' => "咔咔1",
'age' => 24,
'sex' => 1
));
}
public function modifyAction ()
{
$user = new User();
$phql = "UPDATE User SET name = :name:, age = :age:, sex = :sex: WHERE id = :id:";
$status = $user->modelsManager->executeQuery($phql, array(
'id' => 20,
'name' => "咔咔2",
'age' => 25,
'sex' => 2
));
}
public function deleteAction ()
{
$user = new User();
$phql = "DELETE FROM User WHERE id = :id:";
$status = $user->modelsManager->executeQuery($phql, array(
'id' => 20
));
}
以上就是Phalcon入坑必须知道的功能《Phalcon入坑指南系列 二》的详细内容,更多请关注php中文网其它相关文章!
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
程序员必备接口测试调试工具:点击使用
Apipost = Postman + Swagger + Mock + Jmeter
Api设计、调试、文档、自动化测试工具
网页生成APP,用做网站的技术去做APP:立即创建
手机网站开发APP、自助封装APP、200+原生模块、2000+映射JS接口按需打包
相关文章
相关视频