473,216 Members | 1,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Shall I enable short tags?

Hi

I am fairly new to PHP/mysql and was reading an online tutorial and
learned that my short tags weren't enabled.
At this time I have no need for them, my setup apache/mysql/php runs on
my PC just to test code.
Shall I enable short tags or not?
Windows XP pro
PHP 4

Thanks a lot

Patrick

Jul 17 '05 #1
7 7079
.oO(varois83)
I am fairly new to PHP/mysql and was reading an online tutorial and
learned that my short tags weren't enabled.
Good.
At this time I have no need for them, [...]
And you don't really need them.
Shall I enable short tags or not?


No.

Micha
Jul 17 '05 #2
>Shall I enable short tags or not?

No.

Micha


In a follow up to Michael, here is a scenario why.

You just finished writing a web app, wth 100's/1000's of code lines, heaps
of includes, sub apps etc, making use of short tags. You then upload to your
newly purchased webspace, and it doesn't work cos they have short tags
disabled.
You will have fun then, altering the many instances of short tag code.

If you don't use short tags, it will still work as expected on a server with
short tags enabled. Much more friendly.

I have downloaded a number of cms's that were apparently all the rave, only
to find they were written using short tags. My test server doesn't have them
enabled, so to preview them, I had to go through and alter. Not nice. Ended
up deleting, and looking at others.
Jul 17 '05 #3
"varois83" <va******@netzero.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi

I am fairly new to PHP/mysql and was reading an online tutorial and
learned that my short tags weren't enabled.
At this time I have no need for them, my setup apache/mysql/php runs on
my PC just to test code.
Shall I enable short tags or not?
Windows XP pro
PHP 4


I like short tags because you can do ASP style <?=$var?> echos. Most ISPs
leave it on since there's not much of a reason to turn it off.
Jul 17 '05 #4
varois83 wrote:
I am fairly new to PHP/mysql and was reading an online tutorial and
learned that my short tags weren't enabled.
At this time I have no need for them, my setup apache/mysql/php runs on my PC just to test code.
Shall I enable short tags or not?


You're asking one of the "religious" questions--you won't be getting
fair answer here.

You can enable short tags. Short tags are cool and fast (in terms of
coding and execution). When short tags are enabled, you _may_ encounter
some problems when you're outputting XML codes via PHP; this however
can be solved by coding in "such a way".

Most of the servers should support short tags; but there may be few
that don't support.

If you use short tags and if the server doesn't support it, you can
easily do search and replace (ie, <?= to <?php echo). But, there may be
few or many dumb clients who may not be knowing how to handle this
situations.

Personally, though I'm (still) a good fan of short tags, now I'm
moved to long tags. My suggestion is to enable short tags, but to code
in long tags--so that you achieve wide range of compatibility. (If you
disable short tags but did try to output XML, there are chances such
PHP code may not be usable when running on servers with short tags
enabled).

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #5

Hi

This is the original poster. I want to thank everybody who took the
time to answer. I won't enable them at this time.

Thanks again

Patrick

Jul 17 '05 #6
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
If you use short tags and if the server doesn't support it, you can
easily do search and replace (ie, <?= to <?php echo). But, there may be
few or many dumb clients who may not be knowing how to handle this
situations.


Servers (actually, server-side interpreters), not clients. The clients
never see the PHP.
Jul 17 '05 #7
Kenneth Porter wrote:
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
If you use short tags and if the server doesn't support it, you can
easily do search and replace (ie, <?= to <?php echo). But, there may be few or many dumb clients who may not be knowing how to handle this
situations.
Servers (actually, server-side interpreters), not clients. The

clients never see the PHP.


I meant, clients==customers. My English is very poor; sorry.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jason G. | last post by:
I have heard that you cannot use short tags and XML because of the opening line of an xml document... <?xml version="1.0"?> Consider this: <<?= '?'; ?>xml version="1.0"<?= '?'; ?>> ...
1
by: Hans Gruber | last post by:
Hi all, Here`s a problem I have been working on for a while, but can`t seem to solve satisfactory. I have a database with blog entries. Because each of those entries has a variable length...
2
by: nospam | last post by:
I'm trying to do a transform on some xml using the XslTransform class. The input xml contains an empty element in short format like this... <element attrib="abc"/> But during the transform...
7
by: gorkos | last post by:
Hi, I am two days trying to solve a problem with some pages, which i get through HTTPWebRequest. Error is that some pages need Script to be enabled. But how to do this in HTTPWebRequest class?
7
by: mmarlow | last post by:
Hi all, I wish I knew if this was even a PHP problem or not! It's probably Internet Explorer but here goes anyway... Random pages at random times don't appear correctly in IE6, the HTML is...
8
by: comp.lang.php | last post by:
I installed WAMP5 on my WinXP box which works just fine on its own, and I found a practical way of handling my short-tag PHP script via .htaccess: php_flag short_open_tag on To ensure my...
2
by: varois83 | last post by:
Hi I am just starting with PHP. I am reading a PHP 5 book and they say to not use short tags and to actually disable them so I see an error message if I don't form my tags correctly....
16
by: Peter Oliphant | last post by:
Note that although this involves SAPI, it is more a question about Timers and event handlers. I wrote a Speech Recognize handler (SAPI), and put some code in it to enable a Timer. It would not...
4
by: Sony89 | last post by:
Hi guys. How can you enable short tags in your browser?
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.