468,720 Members | 1,585 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,720 developers. It's quick & easy.

PHP on IIS using <? ?>

I am trying to script a page on my IIS server running PHP, and every time i try to use the <? ?> in the script, it wont load it.


Normal Page with NO error

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   echo"this is what is working fine but when i close and reopen the php it causes a error";
  3.  
  4. ?>
Page With Error
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.   echo"this is what is working fine but when i close and reopen the php it causes a error";
  3.  ?>
  4. <head>
  5. </head>
  6. <body>
  7. <center>this is where it causes the error<br> because i shut the php down using the "?>"</center>
  8. </body>
  9. <?
  10. echo"Now the page wont load couse i used the ?> <?"; 
  11. ?>

Any help on this ASAP would be greatly appricated
Oct 7 '10 #1
4 1099
dlite922
1,584 Expert 1GB
When you say it doesn't load the page, do you see just white space? can you look at the page source and see if there's anything is there?

Do you have PHP error reporting turned on?


Dan
Oct 7 '10 #2
Markus
6,050 Expert 4TB
You probably don't have short_open_tag turned on. Use <?php ?> instead.
Oct 8 '10 #3
dlite922
1,584 Expert 1GB
Can't believe I didn't catch that. I've seen better days, I guess.


Dan
Oct 8 '10 #4
Atli
5,058 Expert 4TB
You probably don't have short_open_tag turned on. Use <?php ?> instead.
Seconded.

The <? ... ?> syntax is turned off by default. Best to just forget about it and always use <?php ... ?>.
Oct 8 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Donald Firesmith | last post: by
reply views Thread by clécio | last post: by
1 post views Thread by Marc Boucher | last post: by
3 posts views Thread by ajay2552 | last post: by
1 post views Thread by CARIGAR | last post: by
9 posts views Thread by bryonone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.