From fb43b8cc7a866e7cf4b84acff98dfcb8a257862d Mon Sep 17 00:00:00 2001 From: Julia Kulla-Mader <64906+juliakm@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:29:38 -0500 Subject: [PATCH 1/2] Refactor index.php to output HTML structure and set appropriate headers --- index.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 82966e27a..949e0e709 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,17 @@ + + + + + + Hello World - PHP Sample + + +

Hello World!

+ + \ No newline at end of file From 88bf32bb44b0d8863fb4dd1b398a31acf3667f75 Mon Sep 17 00:00:00 2001 From: Julia Kulla-Mader <64906+juliakm@users.noreply.github.com> Date: Tue, 2 Dec 2025 15:00:34 -0500 Subject: [PATCH 2/2] Update README.md and refactor index.php to simplify output format --- README.md | 2 +- composer.json | 10 ++++++++++ index.php | 19 +++++-------------- 3 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 composer.json diff --git a/README.md b/README.md index e099c918b..9218cc684 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ urlFragment: php-docs-hello-world # PHP Hello World -This sample demonstrates a tiny Hello World PHP app for [App Service](https://docs.microsoft.com/azure/app-service). +This sample demonstrates a tiny Hello World PHP app for [App Service](https://learn.microsoft.com/azure/app-service). ## Contributing diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..428a21ee9 --- /dev/null +++ b/composer.json @@ -0,0 +1,10 @@ +{ + "name": "azure-samples/php-docs-hello-world", + "description": "Hello World PHP sample for Azure App Service", + "type": "project", + "require": { + "php": "^8.1" + }, + "license": "MIT", + "minimum-stability": "stable" +} diff --git a/index.php b/index.php index 949e0e709..52e790bb7 100644 --- a/index.php +++ b/index.php @@ -1,17 +1,8 @@ - - - - - - Hello World - PHP Sample - - -

Hello World!

- - \ No newline at end of file +header('Content-Type: text/plain; charset=UTF-8'); +header('X-Content-Type-Options: nosniff'); +header('X-Frame-Options: DENY'); + +echo "Hello World!"; \ No newline at end of file