dongzhimeng2464
dongzhimeng2464
2013-11-12 18:59

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 doulun1939 8年前

    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.

    点赞 评论 复制链接分享

相关推荐