Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5358

Re: variable path lose slashs when used in an alert

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: variable path lose slashs when used in an alert
Date Fri, 6 Apr 2012 10:42:40 -0500
Organization A noiseless patient Spider
Lines 29
Message-ID <slrnjnu3ng.4ci.hellsop@nibelheim.ninehells.com> (permalink)
References <13h77x0s1h9s8$.1u35g6a12svpi.dlg@40tude.net>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="31027"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YMJ+3ykVVwQjAMpUwu29N"
User-Agent slrn/0.9.9p1 (OpenBSD)
Cancel-Lock sha1:5q0Xx9jpYGcXB4cBzU6lC4s1U/4=
Xref csiph.com comp.lang.php:5358

Show key headers only | View raw


On Fri, 6 Apr 2012 17:10:18 +0200, nawfer wrote:
> variable $temp is a path
> C:\www\site\test\folder\img.jpg
>
> if I write 
> echo $temp;
> ok I have all the path
> ---------
>
> but if I use same variable in an alert I haven't more the correct path;
> haven't the \ slashs
>
> echo"<script type='text/javascript'>";
> echo "alert('$temp')";
> echo "</script>"; 
>
> I tested also string but is equal
> $temp=(string)$temp;
>
>
> is there a solution?

read and understand http://php.net/manual/en/language.types.string.php
especially the part where different quotes make interpretation
different.

-- 
It's not hard, it's just asking for a visit by the fuckup fairy.
              -- Peter da Silva

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

variable path lose slashs when used in an alert nawfer <novalidsforspam@alt.al> - 2012-04-06 17:10 +0200
  Re: variable path lose slashs when used in an alert "Peter H. Coffin" <hellsop@ninehells.com> - 2012-04-06 10:42 -0500
  Re: variable path lose slashs when used in an alert Richard Damon <news.x.richarddamon@xoxy.net> - 2012-04-06 17:19 -0400

csiph-web