FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » A curious thing...about tags.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: A curious thing...about tags. [message #182221 is a reply to message #182220] Mon, 22 July 2013 07:47 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 21/07/13 23:21, Norman Peelman wrote:
> On 07/21/2013 03:35 PM, The Natural Philosopher wrote:
>> On 21/07/13 19:31, Richard Damon wrote:
>>> On 7/21/13 1:14 PM, The Natural Philosopher wrote:
>>>> On 20/07/13 19:33, Denis McMahon wrote:
>>>> > On Sat, 20 Jul 2013 17:09:37 +0200, Thomas Mlynarczyk wrote:
>>>> >
>>>> >> The Natural Philosopher schrieb:
>>>> >>
>>>> >>> suppose I want my string to be "?> something <?"
>>>> >>> How on earth is it possible to STOP PHP interpreting that as some
>>>> >>> blasted 'escape to outputting text'
>>>> >> Sorry, but I still don't quite see the problem. PHP will happily
>>>> >> accept
>>>> >> the above string as what it is: a simple string. It will not try to
>>>> >> interpret the <? or ?> contained within that string (why should
>>>> >> it?).
>>>> > Thomas, the problem is with the ability of the poster you are
>>>> > applying to
>>>> > to comprehend and understand string handling in php, and what his
>>>> > browser
>>>> > views as an element.
>>>> >
>>>> > Most of us understood the need to use &lt; and why in html if we
>>>> > wanted a
>>>> > less than symbol within a few months at most of starting to use html.
>>>> > Some others will never understand it.
>>>> The problem is of course that you have totally failed to understand
>>>> the
>>>> problem I was in fact having.
>>>>
>>>> It has NOTHING to do with the browser.
>>>> The string output was never going anywhere NEAR a browser.
>>>>
>>>> The problem was how to CONSTRUCT a string using PHP, to put in a
>>>> file or
>>>> a database, that contain PHP escape sequences.
>>>>
>>>> Without. PHP interpreting them AS escape sequences.
>>>>
>>>> That is given the string $something, how to make
>>>> $new="?>".$something."<?";
>>>>
>>>> without PHP instantly thinking you wanted to print $something on
>>>> stdout.
>>>>
>>>>
>>>> > Also, as you have noticed, the failure modes that some people post
>>>> > are
>>>> > not the failures that occur in the circumstances they describe. When
>>>> > you
>>>> > see this, you can usually assume that the person concerned does
>>>> > not, to
>>>> > use a common term, know their arse from their elbow.
>>>> >
>>>> Or in this case,.. the person his not bothered to understand the
>>>> actual
>>>> problem being described.
>>>>
>>>>
>>> The issue is that the PHP interpreter is defined to be smart enough
>>> that
>>> the ?> closing tag should NOT be recognized inside a quoted string the
>>> way you have stated. It is almost certainly some other problem.
>>>
>>> Can you post an EXACT COMPLETE example showing the problem and the
>>> output you get (view source on the page)?
>> I managed to get it to work, as I stated earlier..
>>
>> This was the final code which works, hopefully not by some versional
>> quirk
>>
>> $run="?>".$run;
>> $run= $run."<?";
>>
>>
>>
>
> If that works, then so should your original example... as well as:
>
> $run="?> $something <?";
>
> Can you post an example of what wasn't working with output? And
> where the output is going? Cannot duplicate here.
>
> norman@amd64x2:~$ php -version
> PHP 5.3.2-1ubuntu4.19 with Suhosin-Patch (cli) (built: Mar 11 2013
> 15:23:48)
> Copyright (c) 1997-2009 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
>
> norman@amd64x2:~$ php -a
> Interactive shell
>
> php > $something="my text";
> php > $run="?> $something <?";
> php > echo $run;
> ?> my text <?
>
>
In my setup that produces no output at all.
Mind you php -a doesnt produce any output from
php> echo "this";

either..

Nor even a command prompt

It just sits there...




--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Paypal IPN and HTTP 1.1
Next Topic: Query with PHP and MySql
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 00:54:49 GMT 2024

Total time taken to generate the page: 0.06116 seconds