mg78in Posted April 20, 2009 Share Posted April 20, 2009 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 More sharing options...
WolfRage Posted April 20, 2009 Share Posted April 20, 2009 There should be a space between your php tags and any other characters. What are you setting... if you are trying to echo then use echo, stop trying to short cut your code and your porblems will be resolved. Link to comment https://forums.phpfreaks.com/topic/154826-follwoing-tag-wont-work-on-my-php-file/#findComment-814277 Share on other sites More sharing options...
PFMaBiSmAd Posted April 20, 2009 Share Posted April 20, 2009 <?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. Link to comment https://forums.phpfreaks.com/topic/154826-follwoing-tag-wont-work-on-my-php-file/#findComment-814278 Share on other sites More sharing options...
mg78in Posted April 20, 2009 Author Share Posted April 20, 2009 thanks .. issue is now resolved :-) Link to comment https://forums.phpfreaks.com/topic/154826-follwoing-tag-wont-work-on-my-php-file/#findComment-814279 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.