dongzhimeng2464 2013-11-12 18:59
浏览 193
已采纳

XAMPP PHP无法运行

I have just installed XAMPP again, I was using IIS but I have now disabled that.

For some reason disabling it didn't seem to work, as the ports still clashed, so instead I have changed the port for Apache to "1234". As you can see from the control panel below XAMPP seems to be running just fine, the index page shows up fine at least.

XAMPP Control Panel

I made a quick test page and placed it in my install directory (C:\xampp\htdocs\testing.php)

<?
    $test = "hello world";
    echo $test;
?>

I then load this location in Chrome: http://localhost:1234/testing.php But for some reason the page is blank, when I view the pages source I see this:

<?
    $test = "hello world";
    echo $test;
?>

Any ideas?

Edit: Fixed thanks, I was an idiot and didn't open it with

Instead of wasting this thread for such a stupid mistake here is another question. Is there a version of Chrome or Firefox I can use to run my website but lock it in full screen and require a password to get out of it?

  • 写回答

1条回答 默认 最新

  • doulun1939 2013-11-12 19:01
    关注

    Try to use <?php tag instead of <?, this is often disabled in standard php installations.

    BTW, to activate short tags, the property is

    short_open_tag=On
    

    in your php.ini.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用三极管设计—个共射极放大电路
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示