Code revealed to user!

This is a discussion on Code revealed to user! within the PHP Language forums, part of the PHP Programming Forums category; Vince Morgan wrote: > "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message > news:m6ydnYWSlM9YGvnanZ2dnUVZ_gKdnZ2d@comcast....


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 12-16-2007
Jerry Stuckle
 
Posts: n/a
Default Re: Code revealed to user!

Vince Morgan wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:m6ydnYWSlM9YGvnanZ2dnUVZ_gKdnZ2d@comcast.com. ..
>> Hi, Garry,
>>
>> The problem is you're using short tags (bad), and your server has short
>> tags disabled (short_open_tag=off in your php.ini file) (good).
>>
>> You should get in the habit of using long open tags, like Vince
>> indicated. Short open tags can get confusing, especially if you use XML
>> (which has the same <? open tag).
>>

> Actualy I overlooked/missed the short tag. And Jerry is being more kind to
> me than I deserve.
>
> Vince
>
>
>


Naw, Vince, it was just an honest misteak :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #12 (permalink)  
Old 12-16-2007
Toby A Inkster
 
Posts: n/a
Default Re: Code revealed to user!

Jerry Stuckle wrote:

> But you miss the fact you do not WANT it turned on. It will cause
> problems if you ever have an XML page on your site.


I think you're overstating the problems slightly.

It will cause a minor inconvenience if you ever want to generate XML via
PHP, in that processing instructions will need to be explicitly echoed.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 9 days, 1:18.]

Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/1...tunes-sharing/
Reply With Quote
  #13 (permalink)  
Old 12-16-2007
Jonas Werres
 
Posts: n/a
Default Re: Code revealed to user!

> It will cause a minor inconvenience if you ever want to generate XML via
> PHP, in that processing instructions will need to be explicitly echoed.


It will cause a major inconvinience, if you ever want to use PHP6.

Guys, just get it: Just because it works somehow, it's not less bad.
Reply With Quote
  #14 (permalink)  
Old 12-16-2007
jebblue
 
Posts: n/a
Default Re: Code revealed to user!

On Sun, 16 Dec 2007 08:14:45 -0500, Jerry Stuckle wrote:

> jebblue wrote:
>> Thanks for the question and the answer. My server had that set to On,
>> just fixed it.
>>
>>

> But you miss the fact you do not WANT it turned on. It will cause
> problems if you ever have an XML page on your site. I expect the option
> will be removed in a future release.
>
> You should turn it off and use <?php start tags, instead.


I'm confused, I said I fixed it meaning I turned it off, it was set to
on, that's what to do right?

--
// This is my opinion.
Reply With Quote
  #15 (permalink)  
Old 12-17-2007
Chuck Anderson
 
Posts: n/a
Default Re: Code revealed to user!

Jonas Werres wrote:
>> It will cause a minor inconvenience if you ever want to generate XML via
>> PHP, in that processing instructions will need to be explicitly echoed.
>>

>
> It will cause a major inconvinience, if you ever want to use PHP6.
>


Let's not spread misinformation here. Short tags *will* stay in Php6:
http://www.php.net/~derick/meeting-n...nd-add-php-var

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************

Reply With Quote
  #16 (permalink)  
Old 12-17-2007
Jerry Stuckle
 
Posts: n/a
Default Re: Code revealed to user!

jebblue wrote:
> On Sun, 16 Dec 2007 08:14:45 -0500, Jerry Stuckle wrote:
>
>> jebblue wrote:
>>> Thanks for the question and the answer. My server had that set to On,
>>> just fixed it.
>>>
>>>

>> But you miss the fact you do not WANT it turned on. It will cause
>> problems if you ever have an XML page on your site. I expect the option
>> will be removed in a future release.
>>
>> You should turn it off and use <?php start tags, instead.

>
> I'm confused, I said I fixed it meaning I turned it off, it was set to
> on, that's what to do right?
>


OK, I misunderstood that. I thought you meant you fixed your code to
run with it on.

Just a slight misunderstanding. You are correct to have it off.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #17 (permalink)  
Old 12-17-2007
Jerry Stuckle
 
Posts: n/a
Default Re: Code revealed to user!

Toby A Inkster wrote:
> Jerry Stuckle wrote:
>
>> But you miss the fact you do not WANT it turned on. It will cause
>> problems if you ever have an XML page on your site.

>
> I think you're overstating the problems slightly.
>
> It will cause a minor inconvenience if you ever want to generate XML via
> PHP, in that processing instructions will need to be explicitly echoed.
>


Toby,

Much more than a "minor inconvenience" if you ever do anything with XML.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #18 (permalink)  
Old 12-18-2007
Toby A Inkster
 
Posts: n/a
Default Re: Code revealed to user!

Jerry Stuckle wrote:

> Much more than a "minor inconvenience" if you ever do anything with XML.


Pray explain why. Other than having to write:

<? echo '<?xml version="1.0"?>' ?>

instead of

<?xml version="1.0"?>

(and similar for stylesheets), what other problems are likely to arise
from using shorttags in XML documents that do not arise when using other
methods of delimiting PHP code?

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 10 days, 21:03.]

Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/1...tunes-sharing/
Reply With Quote
  #19 (permalink)  
Old 12-18-2007
Jerry Stuckle
 
Posts: n/a
Default Re: Code revealed to user!

Toby A Inkster wrote:
> Jerry Stuckle wrote:
>
>> Much more than a "minor inconvenience" if you ever do anything with XML.

>
> Pray explain why. Other than having to write:
>
> <? echo '<?xml version="1.0"?>' ?>
>
> instead of
>
> <?xml version="1.0"?>
>
> (and similar for stylesheets), what other problems are likely to arise
> from using shorttags in XML documents that do not arise when using other
> methods of delimiting PHP code?
>


Because you have to keep remembering to write it. And if you ever load
a package which has XML, you'll have to go through and edit every single
page.

Why do you think even the guys who created PHP recommend against using it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0