最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

forms - Cannot access a file in the theme (twentynineteen-child) folder

programmeradmin0浏览0评论

Get a 403 Forbidden Error on the Server when I try to access this script which processes form data. Works on my Local Machine though. .php

Here's my form action.

<form action="<?php echo get_stylesheet_directory_uri()  . "/add_restaurant.php"; ?>" id="add_restaurant" method="post">

Get a 403 Forbidden Error on the Server when I try to access this script which processes form data. Works on my Local Machine though. http://example/wp-content/themes/twentynineteen-child/add_restaurant.php

Here's my form action.

<form action="<?php echo get_stylesheet_directory_uri()  . "/add_restaurant.php"; ?>" id="add_restaurant" method="post">
Share Improve this question edited Sep 26, 2019 at 21:16 Sunil Chandurkar asked Sep 26, 2019 at 19:05 Sunil ChandurkarSunil Chandurkar 11 bronze badge 1
  • Thanks for the Negative Point. Was extremely frustrated after doing a lot of research. That's why I asked the question here. – Sunil Chandurkar Commented Sep 26, 2019 at 20:03
Add a comment  | 

1 Answer 1

Reset to default 0

Could you post your code... its better way to help you.

So, I guess you have html form ?

An idea :

Don't specify any path on your form and let manage it into your functions.php

add_action('init', 'my_form_process');
function my_form_process(){
  // Do nonce check, Post check...
}

Have look for Nonce security check : Nonce WordPress page

发布评论

评论列表(0)

  1. 暂无评论