File tree 4 files changed +7
-4
lines changed
4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 9
9
error_page 404 htmlErrorPages/error404.html;
10
10
max_client_body_size 100;
11
11
location / {
12
- allow_methods GET;
12
+ allow_methods GET POST ;
13
13
index index.html index.php;
14
14
autoindex 1;
15
15
root /Users/azabir/Desktop/42Cursus/webserve;
16
+ cgi_pass php /Users/azabir/Desktop/42Cursus/webserve/php-cgi;
17
+
16
18
}
17
19
18
20
location /put_test {
Original file line number Diff line number Diff line change 1
1
<?php
2
- echo "Welcome {$ _POST ["name " ]} <br> " ;
3
- echo "Your email address is: {$ _POST ["email " ]} <br> " ;
2
+ echo "Welcome {$ _POST ["name " ]}, " ;
3
+ echo "Your email address is: {$ _POST ["email " ]}" ;
4
4
?>
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ curl http://127.0.0.1:8000 \
2
+ | curl http://127.0.0.1:8000/test.php -X " POST" -d " name=Abdo &email=Abdo@email.com"
You can’t perform that action at this time.
0 commit comments