Ways to start a PHP script
I just recently installed Fedora Server on my computer and I am planning on hosting my website on this server instead of paying for hosting..
All of my files for my website are currently using php but for some reason when I moved them here to "test" them before launching the final switch, the PHP does not work.. I have further investigated this issue to learn that my php files were written using: <? and ?> to start the scripts Apparently I have to write <?php and php?> to make these scripts work now. Is there a way I can edit a system file to allow me to use both instead of having to change all my files? -Matt |
Hi,
You can use: Code:
short_open_tag = On |
Not necessarily a good idea; you're better off changing your code
to use the "proper" tags. http://stackoverflow.com/questions/2...eptable-to-use Cheers, Tink |
Thank you all very much! I have read the arguments on the other page and have decided to keep the short tags on.
It seemed to me that there was little ground to turn them off, especially since I would be hosting my own server. Thank you again!!! -Matt |
Shame, considering how quick and easy the fix is...
Code:
find -iname \*.php -exec sed -i.bak -r 's/<\?([[:space:]]*.*)/<?php\1/g' {} \; tag is all that needs fixing. Cheers, Tink |
All times are GMT -5. The time now is 05:10 AM. |