starting... <?= dont work |
[eluser]Peter74[/eluser]
hi, well anybody can tell me why the tag <?= dont work for me? i have php 5 version txs <li><?= anchor('application', 'The Application');?></li> that is the look when apply "see code" in firefox
[eluser]mariowarner[/eluser]
have you tried setting the $config['rewrite_short_tags'] at the config.php to TRUE?
[eluser]Peter74[/eluser]
in system/application/config/config.php i dont see $config[’rewrite_short_tags’]. I must add that line? :S
[eluser]Tom Glover[/eluser]
[quote author="Peter74" date="1202336853"]in system/application/config/config.php i dont see $config[’rewrite_short_tags’]. I must add that line? :S[/quote] Yes but the line should be at the bottom of the config file. If it is not there add it. This tell CI to rewrite the short php tags before parsing. also if this does not work report it as a bug, but before you report it check that your version of php can support short tags without the use of CI's conversion.
[eluser]Peter74[/eluser]
Hi, i resolv this issue looking for "short tags", and i find in http://cl2.php.net/ini.core the answer and change short_open_tag = Off to short_open_tag = On in the php.ini file. i find many comments kind "dont do that, use long tags" i dont know why Txs both any way
[eluser]Nanodeath[/eluser]
The reason you find comments like that is that all servers support <?php tags, but only a subset of servers support <? tags. However, since CodeIgniter has rewrite_short_tags, this isn't as much of an issue (unless you're debugging, of course).
[eluser]Peter74[/eluser]
humm, i see... so if i write my app with short tags, and later take some hosting, with only <?php tag support my app dont work .. big problem so, where i can find or add, that function, just adding that line in the config.php file? or i have to add some library too ( i dont know, i thik "something" have to do the work xD ) pd: very txs for ur feedback
[eluser]Nanodeath[/eluser]
Just doing what mariowarner suggested should do the trick, though I believe errors become somehow more cryptic (I believe -- I haven't used it personally).
[eluser]mariowarner[/eluser]
[quote author="Peter74" date="1202336853"]in system/application/config/config.php i dont see $config[’rewrite_short_tags’]. I must add that line?:S[/quote] hi peter, it's found at the bottom of config.php right before the php closing tag (? >). the CI i am using when i started is version 1.5.4 (i only started using CI 9 days ago) and if you're using the same, you should be able to find the line. below is how it looks like on my config.php Code: /* it's ok to edit the php.ini file but if you're gonna run your codes from a different server where you don't have control over the php.ini, it's easier to just modify the value of that line (or add that line if it's missing).
[eluser]mariowarner[/eluser]
ohh, and it doesn't require you to add any libraries. it's there by default (or it should be there by default). i just upgraded to 1.6 and it's still working fine for me. i had a harder time setting up the .htaccess to hide the "index.php" line on the URL. |
Welcome Guest, Not a member yet? Register Sign In |