Azure file path for PHP include

SMC 6 Reputation points
2020-12-30T10:32:14.127+00:00

Hi

Trying to migrate some legacy websites from an old host to Azure Web App. All goes fine apart from php include() functions.

Previously they are include('/header.php') - which when migrated to Azure fails.

If I change simply to include('header.php') it works fine.

There are so many pages I was hoping for an easy fix like changing some kind of path setting in Azure.

Thanks in advance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,889 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,581 Reputation points Microsoft Employee
    2020-12-31T06:59:10.827+00:00

    @SMC I am not aware of anything that's offered within App Services nor is my colleague whom I checked with.

    The best thing I can think of is to do a search for include(/ and do a replace include(

    Let us know if there are any issues with this approach and we can continue the discussion as necessary.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.