douli2063 2015-12-22 13:30
浏览 74

PHP仅在MAMP中部分运行

I recently setup a MAMP environment (v3.5)` to test my website locally rather than having to upload to the host.

The PHP works fine on the remote host, in this case the form will submit.

Here's a link: PHP Form

When I run the site locally only html and css work but the PHP pages show the first few lines of the POST sequence.

Partial run enter image description here

This is the content shown in the viewport

Content-Type: application/x-www-form-urlencoded Content-Length: 59 sendername=&senderemail=&contactno=&user_message=&send=Send

As you can probably guess, this is not the result I am expecting. In the normal scenario, the acknowledgment.php page will load with a 'thank you' message.

Can anyone tell me what is wrong with the MAMP installation that would cause this?

Thank you very much indeed.

  • 写回答

2条回答 默认 最新

  • dongqijuan3786 2015-12-22 14:33
    关注
    • check if you put the method="post" attribute in your form
    • check if you close each tag
    • Check the version of php on your mamp: preferences -> php
    • Reeinstall your mamp

    in any case if it does not work, you can try manually install php

    other think will be that you post your code of file acknowledge.php to check for possible errors

    I hope it helps you...

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题