alin19 Posted February 10, 2009 Share Posted February 10, 2009 how is it called the section from where can i change to work the php scripts with bouth of those start tags? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 10, 2009 Share Posted February 10, 2009 It's called short_open_tag in php.ini. Quote Link to comment Share on other sites More sharing options...
killah Posted February 10, 2009 Share Posted February 10, 2009 google 'short open tags' i think it's called that. In php.ini look for something like: short_open_tags off change off to on Quote Link to comment Share on other sites More sharing options...
waynew Posted February 10, 2009 Share Posted February 10, 2009 You'll go to hell for using them. Quote Link to comment Share on other sites More sharing options...
coder_ Posted February 10, 2009 Share Posted February 10, 2009 You'll go to hell for using them. True!! hehe Quote Link to comment Share on other sites More sharing options...
Prismatic Posted February 10, 2009 Share Posted February 10, 2009 It should be removed Really, what's 3 more characters? Quote Link to comment Share on other sites More sharing options...
gevans Posted February 10, 2009 Share Posted February 10, 2009 Also if you're using xml with php, even along with your DOCTYPE; <?xml version="1.0" encoding="UTF-8"?> Disabling short tags will allow you to use that code without php thinknig you're openning a php script. Of course you can just go <?php echo '<?xml version="1.0" encoding="UTF-8"?>' ?> But flexibility of code is wonderful Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 10, 2009 Share Posted February 10, 2009 Even php.net recommends against using them - ; NOTE: Using short tags should be avoided when developing applications or ; libraries that are meant for redistribution, or deployment on PHP ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. You cannot guarantee that you will always be on a server where you will have the ability to turn on the short_open_tag setting. Quote Link to comment Share on other sites More sharing options...
printf Posted February 10, 2009 Share Posted February 10, 2009 You'll go to hell for using them. love it, he he! Quote Link to comment Share on other sites More sharing options...
premiso Posted February 10, 2009 Share Posted February 10, 2009 The key here is that, <?php will always work (unless something changes). Where as <? will not always work. Go with the sure thing and save yourself future headaches. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 10, 2009 Share Posted February 10, 2009 You'll go to hell for using them. So what happens you you enable the asp style tags? Quote Link to comment Share on other sites More sharing options...
printf Posted February 10, 2009 Share Posted February 10, 2009 This one just kills me, yuck.. (and it still will not be removed in PHP 6) <script language='php'> echo 'hi'; </script> Quote Link to comment Share on other sites More sharing options...
premiso Posted February 10, 2009 Share Posted February 10, 2009 So what happens you you enable the asp style tags? LIMBO!!!! AHHHHHHHH!!! Quote Link to comment Share on other sites More sharing options...
coder_ Posted February 10, 2009 Share Posted February 10, 2009 You'll go to hell for using them. So what happens you you enable the asp style tags? Someone comes and cuts of your hands so you cant do programming anymore... haha Quote Link to comment Share on other sites More sharing options...
alin19 Posted February 10, 2009 Author Share Posted February 10, 2009 You'll go to hell for using them. So what happens you you enable the asp style tags? this is the problem i have to fix o php code and it has: short tags turned on register_long_arrays = On and i have to find all those that he had set on on his computer Quote Link to comment Share on other sites More sharing options...
Maq Posted February 10, 2009 Share Posted February 10, 2009 This one just kills me, yuck.. (and it still will not be removed in PHP 6) <br /> echo 'hi';<br /> I'm going to start using those tags in all of my examples just to bother you now Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 10, 2009 Share Posted February 10, 2009 <script language="php"> printf('hello printf'); </script> Quote Link to comment Share on other sites More sharing options...
killah Posted February 10, 2009 Share Posted February 10, 2009 <script language="php"> $val = isset($t) ? 'World' : 'printf'; printf('Hello %d', $val); </script> Quote Link to comment Share on other sites More sharing options...
coder_ Posted February 10, 2009 Share Posted February 10, 2009 woooow!! I think we got the point of the discussion.. hehehehe Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted February 10, 2009 Share Posted February 10, 2009 <script language="php"> $var = 'printf'; $var('hello %s', $var); </script> I win. Quote Link to comment Share on other sites More sharing options...
printf Posted February 10, 2009 Share Posted February 10, 2009 I'm just laughing my butt off... you guys are awesome! Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 10, 2009 Share Posted February 10, 2009 You could probably put a variable variable into that as well. 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.