Nathanl Posted April 12, 2007 Share Posted April 12, 2007 This may be a pretty basic newb question, but i cant find the answer elsewhere. I'm not a php guy, its on the list of languages to learn, but ive been occupying myself with Perl, and C lately. Anyway, i have a server, running windows 2000, that a customer is running a PHP calendar application on. I had some trouble with php, but i got it worked out by running PHP in cgi mode vs isapi mode. Now php is working, but it only parses code which uses "<?php" as the opening tag. His application of course uses "<?" in all of its code. Ive done some digging online, and everyone says that they two opening tags are interchangable. If thats the case, why doesnt this server parse code opened with the "<?" tag? Is there some sort of option in php.ini which allows this? Thanks! Quote Link to comment Share on other sites More sharing options...
obsidian Posted April 12, 2007 Share Posted April 12, 2007 From the manual: While the tags seen in examples one and two are both always available, example one is the most commonly used, and recommended, of the two. Short tags (example three) are only available when they are enabled via the short_open_tag php.ini configuration file directive, or if php was configured with the --enable-short-tags option. Note: If you are using PHP 3 you may also enable short tags via the short_tags() function. This is only available in PHP 3! This was found on the Basic Syntax page of the manual. Basically, if you want to use the "<?" short tags, you've got to see if short_open_tag is turned on in your php.ini file. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Nathanl Posted April 12, 2007 Author Share Posted April 12, 2007 From the manual: While the tags seen in examples one and two are both always available, example one is the most commonly used, and recommended, of the two. Short tags (example three) are only available when they are enabled via the short_open_tag php.ini configuration file directive, or if php was configured with the --enable-short-tags option. Note: If you are using PHP 3 you may also enable short tags via the short_tags() function. This is only available in PHP 3! This was found on the Basic Syntax page of the manual. Basically, if you want to use the "<?" short tags, you've got to see if short_open_tag is turned on in your php.ini file. Hope this helps. Thank you!! I didnt even know that the manual existed until now. Like i said, i'm pretty new to php. That option fixed it, thank you! Quote Link to comment Share on other sites More sharing options...
obsidian Posted April 12, 2007 Share Posted April 12, 2007 I didnt even know that the manual existed until now. Like i said, i'm pretty new to php. Keep it close! The manual is your best friend when working through new things. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.