Page 1 of 1

[SOLVED] Proper PHP Code <? vs <?php

PostPosted: 26. October 2009 00:35
by stuffdone
I installed XAMPP on Win2k and sites using ( for example ) <? include 'file'; ?> will not function however if the code is altered to <?php include 'file'; ?> they do work.

Here is the problem. I have a lot of existing sites that use the former and none will function in my xampp server. It is really not practical for me to manually change thousands of files.

Is there some way I can alter a config file somewhere to make the <? --- ?> function as it does on my production web server? ( without the php )

:)

Re: Proper PHP Code <? vs <?php

PostPosted: 26. October 2009 00:44
by Wiedmann
Is there some way I can alter a config file somewhere to make the <? --- ?> function

http://de.php.net/manual/en/language.basic-syntax.phpmode.php

(btw: I guess this is asked and answered ~10 times a week in this forum...)

[SOLVED] Proper PHP Code <? vs <?php

PostPosted: 26. October 2009 01:12
by stuffdone
Wiedmann wrote:
Is there some way I can alter a config file somewhere to make the <? --- ?> function

http://de.php.net/manual/en/language.basic-syntax.phpmode.php

(btw: I guess this is asked and answered ~10 times a week in this forum...)


Thanks....got it! Perhaps since it is kinda hard to phrase a search to find that it could be added to the FAQ?

Re: [SOLVED] Proper PHP Code <? vs <?php

PostPosted: 26. October 2009 01:40
by Wiedmann
it could be added to the FAQ?

Hm, the above link is the very first chapter in the PHP with the basics how to use PHP. I guess all people who want use PHP are reading this? ... ;-)

Re: [SOLVED] Proper PHP Code <? vs <?php

PostPosted: 26. October 2009 15:49
by stuffdone
Wiedmann wrote:
it could be added to the FAQ?

Hm, the above link is the very first chapter in the PHP with the basics how to use PHP. I guess all people who want use PHP are reading this? ... ;-)


Not everyone is going to study PHP to use this nifty program...! It is nice to find helpful people who already know stuff to help solve what for them is an easy problem rather than try to become proficient at the beginning in PHP, MySQL and Apache.

I put this on my machine to have a place to start to learn so it will be a tool for that purpose so I did want it to be functional in the first place or it would not be a very good tool !

Thanks again for your help. :D