Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG 14 1567
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
>and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
>and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
The short_open_tag option is a PHP configuration option in php.ini.
It's not reliable or portable to rely upon the availability of short
tags. The <?=$foo?synta x relies upon short tags.
It's not a problem with PHP5, it just depends on how PHP is configured.
--
Curtis
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
>and in fact renders that in the output that is sent to the browser.
Just use sed or awk to change all instances of "<?" to "<?php". You
don't want short tags.
Jerry Stuckle wrote:
jerrygarciuh wrote:
>Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
>>and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5 thing.
So my question to you: is <?php going to become required? And if it is will we not be allowed to echo by the shorthand <?php=$foo? as we used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.
I think what is really disturbing is he stated that his sysadmins did
not know what the problem was.
Scotty
Hugh Oxford wrote:
jerrygarciuh wrote:
>Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
>>and in fact renders that in the output that is sent to the browser.
Just use sed or awk to change all instances of "<?" to "<?php". You
don't want short tags.
Don't forget about the <?=$foo?synta x, it's not as simple as just
changing "<?" to "<?php". Something equivalent would be:
<?php echo $foo; ?>
--
Curtis
On Oct 23, 3:52 pm, Curtis <dye...@gmail.c omwrote:
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
The short_open_tag option is a PHP configuration option in php.ini.
It's not reliable or portable to rely upon the availability of short
tags. The <?=$foo?synta x relies upon short tags.
It's not a problem with PHP5, it just depends on how PHP is configured.
--
Curtis
Thanks Curtis, I'll definitely bear this in mind going forward.
JG
On Oct 23, 4:31 pm, Hugh Oxford <ares...@fas.co mwrote:
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Just use sed or awk to change all instances of "<?" to "<?php". You
don't want short tags.
Thanks for the reply. I used UltraEdit locally and re-upped.
JG
On Oct 23, 3:42 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Thanks Jerry! You are always the man with the answers in clphp! If
you find yourself in New Orleans I owe you some beers!
JG
On Oct 23, 7:17 pm, Curtis <dye...@gmail.c omwrote:
Hugh Oxford wrote:
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ? and in fact renders that in the output that is sent to the browser.
Just use sed or awk to change all instances of "<?" to "<?php". You
don't want short tags.
Don't forget about the <?=$foo?synta x, it's not as simple as just
changing "<?" to "<?php". Something equivalent would be:
<?php echo $foo; ?>
--
Curtis
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jonny T |
last post by:
hi,
i want to echo the string '<?php' in a php script like :
echo "<?php";
but when i try nothing gets displayed ...
if I use
echo "<\?php";
|
by: Preslopsky |
last post by:
I am currently evaluating what language I should use to create a web
interface to some of our databases. I am purely in the fact finding
stage at this point, having no website nor database set up yet. This
is sort of a new area for me, so I am looking for some advice.
Part of our organization has Cold Fusion running on its web server.
It would really be no problem for me to build an application there for
some of the "public" verisions...
|
by: Kevin |
last post by:
Hi! I recently completed a graduate level Java class at a local
university. For our class project my group built a web-based
application. Basically, the application would let a manufacturing
company sell any 'extra' inventory to any authorized user via the
internet. The users could log in, view the inventory available, and
make a bid on any of the inventory available. At the end of the day,
the highest bidder 'wins' that inventory and...
|
by: Gérard Talbot |
last post by:
Hello all,
I'd like to know and understand the difference between, say,
<img src="/ImageFilename.png" width="123" height="456" alt="">
and
<img src="/ImageFilename.png" style="width: 123px; height: 456px;"
alt="">
|
by: jason |
last post by:
Pardon the newbie question...
What's the difference between (asp.net)VB code inside one versus the
other. And why have both?
| |
by: Michael |
last post by:
Since the include function is called from within a PHP script, why
does the included file have to identify itself as a PHP again by
enclosing its code in <?php... <?>
One would assume that the PHP interpreter works like any other, that
is, it first expands all the include files, and then parses the
resulting text. Can anyone help with an explanation?
Thanks,
M. McDonnell
|
by: news.microsoft.com |
last post by:
PHP versus Microsoft ASP.net - A Straightforward Comparison
"I do ask that you read this article with an open mind, and consider that it is quite possible that PHP is no better or worse than ASP.net. I have become weary of the whole PHP is superior to ASP.net debate. I believe after reading you may find that ASP.net has a lot to offer you as a developer, maybe more so than PHP.
We as business persons evaluate technology based on...
|
by: news.microsoft.com |
last post by:
PHP versus Microsoft ASP.net - A Straightforward Comparison
"I do ask that you read this article with an open mind, and consider that it is quite possible that PHP is no better or worse than ASP.net. I have become weary of the whole PHP is superior to ASP.net debate. I believe after reading you may find that ASP.net has a lot to offer you as a developer, maybe more so than PHP.
We as business persons evaluate technology based...
|
by: Gert Kok |
last post by:
When fgets() reads a string that ands with <<<EOT, the string is
truncated after << and a lot of following input is discarded.
When <<<EOT is changed to <<< EOT, behaviour is as I expect it.
Can it be explained why the content of a file is interfering with the
behaviour of fgets()?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |