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 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型