# Php scripts not working

**URL:** <https://forum.infinityfree.com/t/php-scripts-not-working/14541>\
**Category:** Hosting Support\
**Created:** [April 11, 2019, 6:02am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541 "2019-04-11T06:02:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon40740566](https://forum.infinityfree.com/letter_avatar/anon40740566/32/6_449c533f586939b6e5f246632a46421f.png) [@anon40740566](https://forum.infinityfree.com/u/anon40740566)\
**Post date:** [April 11, 2019, 6:02am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/1 "2019-04-11T06:02:52Z")

</div>

my php scripts are not working after hosted in server they do work good in localhost i did change the php versions as well. Localhost its php 5.6 and changed it to 5.6 in server too still php commands doesn’t work  
eg : very simply php includes command for navbar and fotter doesnt work why?

---

<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:** [April 11, 2019, 6:42pm UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/3 "2019-04-11T18:42:25Z")

</div>

Can you please provide a bit more information about the issue. What do you see exactly when it “doesnt work”? Do you see any error messages?

---

<div class="post-metadata">

**Author:** ![anon40740566](https://forum.infinityfree.com/letter_avatar/anon40740566/32/6_449c533f586939b6e5f246632a46421f.png) [@anon40740566](https://forum.infinityfree.com/u/anon40740566)\
**Post date:** [April 12, 2019, 4:36am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/4 "2019-04-12T04:36:23Z")

</div>

my includes commands are not running. so the webpage is not having the nav bar and footer

check this " [http://gofaadil.epizy.com](http://gofaadil.epizy.com/) "

---

<div class="post-metadata">

**Author:** ![anon89156835](https://forum.infinityfree.com/letter_avatar/anon89156835/32/6_449c533f586939b6e5f246632a46421f.png) [@anon89156835](https://forum.infinityfree.com/u/anon89156835)\
**Post date:** [April 12, 2019, 5:48am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/5 "2019-04-12T05:48:20Z")

</div>

Put contents in your index.php into a text file and upload to your root directory, and mention the text file name. Or simply reply with your index.php content.

 ![source](https://forum-cdn.infinityfree.net/original/2X/7/79afbfff8194251259654dc78fcdb83a019d9adb.png)

---

<div class="post-metadata">

**Author:** ![anon40740566](https://forum.infinityfree.com/letter_avatar/anon40740566/32/6_449c533f586939b6e5f246632a46421f.png) [@anon40740566](https://forum.infinityfree.com/u/anon40740566)\
**Post date:** [April 12, 2019, 5:56am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/6 "2019-04-12T05:56:50Z")

</div>

thanks but this is the issue  
\<header class=“header\_area”\>

\<div class=“main\_menu”\>

\<?php include\_once(“…/atlatictech/includes/navbar.php”) ?\>

\</div\>

\</header\>

this script is not working

---

<div class="post-metadata">

**Author:** ![anon89156835](https://forum.infinityfree.com/letter_avatar/anon89156835/32/6_449c533f586939b6e5f246632a46421f.png) [@anon89156835](https://forum.infinityfree.com/u/anon89156835)\
**Post date:** [April 12, 2019, 6:13am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/7 "2019-04-12T06:13:38Z")

</div>

Maybe this can help you,

> <https://stackoverflow.com/questions/5588639/php-include-once-not-working>

---

<div class="post-metadata">

**Author:** ![anon40740566](https://forum.infinityfree.com/letter_avatar/anon40740566/32/6_449c533f586939b6e5f246632a46421f.png) [@anon40740566](https://forum.infinityfree.com/u/anon40740566)\
**Post date:** [April 12, 2019, 10:19am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/8 "2019-04-12T10:19:17Z")

</div>

i used below code snippet and it worked

\<?php $path = $\_SERVER['DOCUMENT\_ROOT']; $path .= "/includes/title.php"; include\_once($path); ?\>

---

<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:** [June 11, 2019, 10:19am UTC](https://forum.infinityfree.com/t/php-scripts-not-working/14541/9 "2019-06-11T10:19:22Z")

</div>

Closed on June 11, 2019, 10:19am UTC

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