ConfigWebSitePHP
Managing Websites with the AWS SDK for PHP
This topic explains how to use classes from the AWS SDK for PHP to configure and manage an Amazon S3 bucket for website hosting. It assumes that you are already following the instructions for Using the AWS SDK for PHP and Running PHP Examples and have the AWS SDK for PHP properly installed. For more information about the Amazon S3 website feature, see Hosting a Static Website on Amazon S3.
The following PHP example adds a website configuration to the specified bucket. The create_website_config
method explicitly provides the index document and error document names. The example also retrieves the website configuration and prints the response. For more information about the Amazon S3 website feature, see Hosting a Static Website on Amazon S3.
For instructions on creating and testing a working sample, see Using the AWS SDK for PHP and Running PHP Examples.