简体   繁体   English

在编辑器中的Joomla表单找不到关联的php操作文件

[英]Joomla form in editor does not find the associated php action file

I am new to Joomla and I am struggling to get a form going. 我是Joomla的新手,我正在努力申请表格。 I created the form using the editor of an Extra Field. 我使用“额外字段”的编辑器创建了表单。 Now in the form I am calling the action php file: 现在以表单的形式调用动作php文件:

<form action="email1.php" method="post" class="form-horizontal">

Unfortunately, nothing is happening and I suspect that I put the php file in the wrong directory. 不幸的是,什么也没有发生,我怀疑我将php文件放在错误的目录中。 Looking at the file manager I have no idea where to put the php file. 看着文件管理器,我不知道将php文件放在哪里。 Can anybody tell me where I have to copy the php file to so that the editor can find it? 有人可以告诉我将php文件复制到哪里,以便编辑器可以找到它吗?

I would advice you to create a folder on the main directory of your website to collect your own datas/pages without messing joomla original file. 我建议您在网站的主目录上创建一个文件夹,以收集自己的数据/页面,而不会弄乱joomla原始文件。 Let's call it "myfolder" and copy email1.php in it. 让我们将其称为“ myfolder”,然后在其中复制email1.php。

Now you can go to 'www.mysite.com/myfolder/email1.php' and expect some kind of result. 现在,您可以转到“ www.mysite.com/myfolder/email1.php”,并期待某种结果。

Now modify your code to avoid that mysterious relative path and use this instead : 现在,修改您的代码以避免该神秘的相对路径,而改用此路径:

<form action="/myfolder/email1.php" method="post" class="form-horizontal">

This should do the trick. 这应该可以解决问题。

Edit : this is a generic answer, not joomla specific. 编辑:这是一个通用的答案,而不是特定于joomla。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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