1

Bascially, I got a basic setlocale code below that works on MAMP PRO on OSX. However, when I loaded up the files to MS Azure Web App PHP 5.6.10 running on a IIS 8.0 it turns out BLANK with no errror. Can anyone please advise? I am trying to locate the problems for a few nights.

<?php 
setlocale(LC_TIME, 'en-US');
$date = '2016-01-25 09:44:17'; 
$date = strftime('%d %b %G %I:%M %p', strtotime($date));
echo $date; //25 Jan 2016 09:44 AM
?>
DANLEE
  • 443
  • 1
  • 8
  • 25

1 Answers1

1

Your code could work as expect on my side. I just created a new Azure Web Apps Service and create one single PHP script with your example code, it worked fine.

You can try to change display_errors to On in custom PHP build-in runtime to show your PHP errors. As a product env for PHP application, this setting is closed by default. You can refer to How to: Change the built-in PHP configurations for details.

And as I find you have added the tag cakephp, so if your PHP application is built in a framework, you can try to check whether the dependencies are completely installed.

You can login the KUDU console site of your Azure Web Apps service to modify the files, or install composer extension at the site extension tab. The Kudu console site's URL should be like:https://<your_site_name>.scm.azurewebsites.net/DebugConsole

Additionally, you can leverage Visual Studio Online, which is an online editor enable you to manage and develop your application on Azure App Service to edit and manage your application on Azure. refer to the answer of Visual Studio 2015 and Microsoft Azure syncing files, Server/Local to see how to enable this setting.

Community
  • 1
  • 1
Gary Liu
  • 13,758
  • 1
  • 17
  • 32