开发者

php files download instead of running php scripts

开发者 https://www.devze.com 2023-01-25 04:00 出处:网络
I am Tho开发者_StackOverflowmas. And this is my first post! I have downloaded MAMP and created a very simple html form which references a very simple php file. I have put the php file into MAMP\'s ht

I am Tho开发者_StackOverflowmas. And this is my first post!

I have downloaded MAMP and created a very simple html form which references a very simple php file. I have put the php file into MAMP's htdocs folder, and linked it to the html document accordingly. I do not know where to put the html file. When I use google chrome, hitting the submit button on my form downloads the php file. And in Safari, the page advances to a screen showing the code displayed in raw format.

I do not know what I need to do to make MAMP do the php. Is it a file location issue? Can someone please help?

Thank you in advance! Thomas

ps. I did try just to submit this in the MAMP forum, but it needs to be reviewed and expurgated by a moderator before that site will publish it. I apologize if my question is outside the typical province of this forum. Thanks again!


One of a few things:

  • Your MAMP isn't running all of the services
  • Your MAMP isn't configured correctly
  • You file was saved in the wrong encoding format. This usually occurs when you send a PHP file to the server through FTP and it's sent as binary instead of ASCII. If your editor is set to a enctype that isn't supported by the web server, it won't process the file and send it to you as a download.
0

精彩评论

暂无评论...
验证码 换一张
取 消