简体   繁体   中英

How can I add .php and .js files in WordPress?

I am new to WordPress and I want ask that how I can add .php files in the WordPress through Visual Editor. I won't be using those files directly but I need to validate some HTML form by calling that php script through Ajax. I am very good at PHP and many other web programming languages but I have never use WordPress. I would be highly grateful if you could help me with that. I can have more than 20 php files so I think it would pretty absurd to add all these files by adding new pages in the WordPress.

由于您无权访问FTP服务器,因此需要一个插件,例如https://wordpress.org/plugins/wp-file-upload/,才能将PHP脚本上传到wp-contents文件夹。

I would recommend uploading them to a /php/ subfolder in your wp-content/uploads/ folder via FTP. Then on your form you would point to a url like action=/wp-content/uploads/php/test.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM