简体   繁体   English

Amazon S3上的PHP文件不起作用

[英]PHP files on Amazon S3 Not Working

Total newb question I'm sure but I'm new to S3 and trying to open a simple PHP file on my server. 我确定总有newb问题,但我是S3的新手,并尝试在服务器上打开一个简单的PHP文件。 Yet it prompts to Save the file each time instead of opening it. 但是,它提示每次都保存文件而不是打开文件。 Is S3 not able to run PHP files? S3无法运行PHP文件吗?

I believe Amazon S3 is a storage not a server . 我相信Amazon S3是storage而不是server

Amazon S3: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage. Amazon S3:Amazon Simple Storage Service(Amazon S3),为开发人员和IT团队提供安全,持久,高度可扩展的对象存储。 Amazon S3 is easy to use, with a simple web service interface to store and retrieve any amount of data from anywhere on the web. Amazon S3易于使用,具有简单的Web服务界面,可以从Web上的任何位置存储和检索任意数量的数据。 With Amazon S3, you pay only for the storage you actually use. 使用Amazon S3,您只需为实际使用的存储付费。 There is no minimum fee and no setup cost. 没有最低费用,也没有安装成本。

Link: https://aws.amazon.com/s3/ 链接: https//aws.amazon.com/s3/

Amazon EC2: Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. Amazon EC2:Amazon Elastic Compute Cloud(Amazon EC2)是一项网络服务,可在云中提供可调整大小的计算能力。 It is designed to make web-scale cloud computing easier for developers. 它旨在使开发人员更轻松地进行Web规模的云计算。

Link: https://aws.amazon.com/ec2/ 链接: https//aws.amazon.com/ec2/

You want to get an instance from EC2 and install php on its linux server. 您要从EC2获取实例,并将php安装在其linux服务器上。

AWS has a great tutorial to do so here . AWS 在此处提供了很棒的教程。

Basically AWS EC2 linux servers are the same as any other linux server except lots of features from AWS so you can follow other tutorials on how to install PHP on an Apache2 servers. 基本上,AWS EC2 linux服务器与任何其他linux服务器相同,不同之处在于AWS的许多功能,因此您可以按照其他教程了解如何在Apache2服务器上安装PHP。

Good luck! 祝好运!

EDIT: However, you can host a static website. 编辑:但是,您可以托管一个static网站。 Static website is a website that shows the same content for all users. 静态网站是一个为所有用户显示相同内容的网站。 Basic informational websites are the example. 基本的信息网站就是一个例子。 As opposed to static website, dynamic website is a website that shows different contents for different users. static网站相反, dynamic网站是为不同用户显示不同内容的网站。 The purpose of php script is to create a dynamic website, so you must look for other options than AWS S3. php script的目的是创建一个动态网站,因此您必须寻找除AWS S3之外的其他选项。 So EC2 would be great fit for you. 因此EC2非常适合您。

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

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