# PHP do not work

**URL:** <https://forum.infinityfree.com/t/php-do-not-work/74197>\
**Category:** Hosting Support\
**Created:** [March 31, 2023, 8:19am UTC](https://forum.infinityfree.com/t/php-do-not-work/74197 "2023-03-31T08:19:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Val6786](https://forum.infinityfree.com/letter_avatar/val6786/32/6_449c533f586939b6e5f246632a46421f.png) [@Val6786](https://forum.infinityfree.com/u/Val6786)\
**Post date:** [March 31, 2023, 8:19am UTC](https://forum.infinityfree.com/t/php-do-not-work/74197/1 "2023-03-31T08:19:59Z")

</div>

[### Website URL](http://valval6786.lovestoblog.com/)

(please specify the URL of the site on which you are experiencing the problem)

### No errors

(please share the FULL error message you see, if applicable)

### Simple PHP test in file index.htm : \<?php

echo “Hello World!”;  
?\>  
produced nothing.

(other information and details relevant to your question)

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [March 31, 2023, 9:19am UTC](https://forum.infinityfree.com/t/php-do-not-work/74197/2 "2023-03-31T09:19:53Z")

</div>

Shouldn’t it be index.php instead of index.htm?

---

<div class="post-metadata">

**Author:** ![Val6786](https://forum.infinityfree.com/letter_avatar/val6786/32/6_449c533f586939b6e5f246632a46421f.png) [@Val6786](https://forum.infinityfree.com/u/Val6786)\
**Post date:** [March 31, 2023, 9:52am UTC](https://forum.infinityfree.com/t/php-do-not-work/74197/3 "2023-03-31T09:52:51Z")

</div>

Thanks, it works, but I expected that file with HTML and php codes must be .htm .  
Again thanks for .php

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [March 31, 2023, 11:25am UTC](https://forum.infinityfree.com/t/php-do-not-work/74197/4 "2023-03-31T11:25:04Z")

</div>

Most servers by default will only execute PHP code in files with the `.php` extension. Files with the `.htm` or `.html` extensions are assumed to be static HTML and are not processed with PHP.

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [April 7, 2023, 11:25am UTC](https://forum.infinityfree.com/t/php-do-not-work/74197/5 "2023-04-07T11:25:19Z")

</div>

Closed on April 7, 2023, 11:25am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
