Jump to content

follwoing tag wont work on my php file : <?php=


mg78in

Recommended Posts

Hi, I am new to PHP and currently facing issues while working on my 1st PHP app.

 

THe issue is :

 

<?php= form_open('expense/fix_insert');?>

 

would not work on my PHP file and would not get translated to

<form method = "post" action = "http://localhost/ci/index.php/expense/fix_insert">

in the source code on the browser. I am using codeignite framework for my application and have loaded form helper in controller already.

 

Moreover, <?=$expenditure?> type of tag also does not work .. only when I use echo then it works..

 

in php.ini I have made below change:

  short_open_tag = On          [Portability]

 

please suggest.

 

Many Thanks,

MG

 

 

Link to comment
https://forums.phpfreaks.com/topic/154826-follwoing-tag-wont-work-on-my-php-file/
Share on other sites

<?php= is not valid in any version or configuration of php, ever.

 

Use <?php echo

 

short_open_tag is not portable because you won't always be on a server where you can turn the setting on. php.net even tells you not to use it -

 

; 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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.