dounao2829
2015-06-29 18:55
浏览 307
已采纳

使用XAMPP在浏览器中打开Php文件时遇到问题

I have simple PHP code:

<form action="demo.php" method="post" />
 <p>Input 1: <input type="text" name="input1" /></p>
 <input type="submit" value="Submit" />
 </form>

Then when I right click it, hover over 'open with' with my mouse, Safari isn't a recommended application. (I am on OS X). I have installed XAMPP. Then I followed an answer on another question on here, and it still didn't work. I found the XAMPP folder, the htdocs, then I made a folder named php that had my form.php file. Then, I got in Safari, and typed: http:/localhost/form.php, and it still did not work. What am I doing wrong?

图片转代码服务由CSDN问答提供 功能建议

我有简单的PHP代码:

 &lt; form action  =“demo.php”method =“post”/&gt; 
&lt; p&gt;输入1:&lt; input type =“text”name =“input1”/&gt;&lt; / p&gt; 
&lt;输入类型 =“submit”value =“提交”/&gt; 
&lt; / form&gt; 
   
 
 

然后当我右键单击它时,将鼠标悬停在“打开方式”上 我的鼠标,Safari不是推荐的应用程序。 (我在OS X上)。 我已经安装了XAMPP。 然后我在这里回答了另一个问题的答案,但它仍然没有奏效。 我找到了XAMPP文件夹,htdocs,然后我创建了一个名为php的文件夹,它有我的form.php文件。 然后,我进入Safari,输入: http:/localhost/form.php ,它仍然无效。 我做错了什么?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douben1891 2015-06-29 19:02
    已采纳

    you have to type the url http://localhost/php/form.php, in the browser to open the above form.

    点赞 打赏 评论

相关推荐 更多相似问题