Welcome Guest, Not a member yet? Register   Sign In
PHP Opening tag -- <? and <?php
#1

[eluser]foobarph[/eluser]
Hi CI guys, I have a quick newbie question (I tried searching about it the net and the forum but i cannot seem to find answer)

How does '<?=$error ?>' work with CI and PHP?

I mean, my PHP doesn't compile this stuff. Is there any substitute for me to make this work?

Concrete examples are below.

Quote:<?=form_open_multipart('upload/do_upload'); ?>
- does not work on my part

Quote:<?php echo form_open_multipart('upload/do_upload'); ?>
- works on my part.

If there is a setting in my PHP file that I should change, please tell me. Thanks!
#2

[eluser]foobarph[/eluser]
I will answer my own question:

Set short tags to TRUE in config/config.php file

http://ellislab.com/codeigniter/user-gui...e_php.html

Oh brother..
#3

[eluser]codex[/eluser]
[quote author="foobarph" date="1217599117"]I will answer my own question:

Set short tags to TRUE in config/config.php file

http://ellislab.com/codeigniter/user-gui...e_php.html

Oh brother..[/quote]

Do yourself a favour and don't use short tags. From php6 they will be deprecated. Ok, that time has yet to come, but it'll save you time then ;-)
#4

[eluser]Tom Glover[/eluser]
[quote author="codex" date="1217627337"][quote author="foobarph" date="1217599117"]I will answer my own question:

Set short tags to TRUE in config/config.php file

http://ellislab.com/codeigniter/user-gui...e_php.html

Oh brother..[/quote]

Do yourself a favour and don't use short tags. From php6 they will be deprecated. Ok, that time has yet to come, but it'll save you time then ;-)[/quote]

Not Quite, just found this on the net:

Quote:Farewell <%
They will remove support for the ASP style tags, but the PHP short-code tag will remain (&lt;?) - so to those on php general who reckon the short-tag is 'depreceated' - hah! ;-)
#5

[eluser]codex[/eluser]
[quote author="WackyWebs.net" date="1217627581"][quote author="codex" date="1217627337"][quote author="foobarph" date="1217599117"]I will answer my own question:

Set short tags to TRUE in config/config.php file

http://ellislab.com/codeigniter/user-gui...e_php.html

Oh brother..[/quote]

Do yourself a favour and don't use short tags. From php6 they will be deprecated. Ok, that time has yet to come, but it'll save you time then ;-)[/quote]

Not Quite, just found this on the net:

Quote:Farewell <%
They will remove support for the ASP style tags, but the PHP short-code tag will remain (&lt;?) - so to those on php general who reckon the short-tag is 'depreceated' - hah! ;-)
[/quote]

Nevertheless, &lt;?php is still better practice than &lt;?
#6

[eluser]Scriptor[/eluser]
I read somewhere that they'll add &lt;?php=...?&gt;, since while they might not completely remove short-open, they do recommend against it.




Theme © iAndrew 2016 - Forum software by © MyBB