Doubt with the syntax in CodeIgniter

2

I'm following this codigofacilito tutorial on Youtube:

link

I try to do the form, but it does not appear on screen, and it is due to the fact that in the video they use a syntax very different from php, which I copy but it does not work in my xampp.

For example, in the video they do this:

<?= form_input($nombre) ?>

But if I do it like that, it does not work for me, so I'm forced to use the "old-fashioned" form of php, like this:

<?php echo form_input($nombre) ?>

That's how it works for me.

Over there I heard something about changing something in php.ini in order to use that summary syntax. The truth is that I'm not a fan of that summary syntax and I prefer php, but I want to be able to follow the examples of the videos to the letter or I'll get lost.

How do I activate those summary commands?

    
asked by Felipe Pino 22.08.2016 в 22:47
source

1 answer

2

That feature you have to enable it in your php.ini file, specifically by modifying

short_open_tag

For that, look for your php.ini file and open it in a text editor, look for the short_open_tag line, if it is commented, uncomment it and change it by:

short_open_tag = On

Then restart your server.

  

Note: This directive also affects the abbreviation <?= in versions   prior to PHP 5.4.0, which is the same as <? echo . The use of   this abbreviation required that short_open_tag be activated. Since   PHP 5.4.0, <?= is always available.

More information at:

link

    
answered by 22.08.2016 / 22:56
source