php-general Digest 12 Sep 2012 13:53:34 -0000 Issue 7960
Topics (messages 319039 through 319042):
Re: fets() escaping some characters
319039 by: Samuel Lopes Grigolato
319040 by: sunil meena
319041 by: Marco Behnke
How to limit source IP in PHP
319042 by: Tonix (Antonio Nati)
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
This issue has to do with HTML markup. You need to properly "escape"
characters before sending them as text to the browser. Try to use this PHP
function to escape your string: echo htmlspecialchars($yourstringhere);
Regards,
Samuel.
-----Mensagem original-----
De: sunil meena [mailto:sunil.extc2...@gmail.com]
Enviada em: terça-feira, 11 de setembro de 2012 14:49
Para: php-gene...@lists.php.net
Assunto: [PHP] fets() escaping some characters
Hello Everyone,
Very new to the list.
So I am trying to echo a string to the browser as follows -
$str = "0x100092000 - 0x1000b7fff +com.apple.com (2.0 - 56)
<BB91F4F8-3B1B-93C6-0D1A-E431E96F1BA3> /Library/PrivateFrameworks";
echo $str;
However the text between "<" and ">" i.e
"BB91F4F8-3B1B-93C6-0D1A-E431E96F1BA3" doesn't get echoed instead all I get
is "0x100092000 - 0x1000b7fff +com.apple.com (2.0 - 56)
/Library/PrivateFrameworks";
Anyone knows why this is happening?
This happened while I was getting a line using fgets and hence I tried
storing that string into a variable and outputting but it still doesn't show
the characters between the "<>".
Any help is highly appreciated.
Thanks
--
Best Regards,
Sunil Meena
--- End Message ---
--- Begin Message ---
Thanks a ton Samuel!
Appreciate it.
On Tue, Sep 11, 2012 at 10:54 AM, Samuel Lopes Grigolato <
samuel.grigol...@gmail.com> wrote:
> This issue has to do with HTML markup. You need to properly "escape"
> characters before sending them as text to the browser. Try to use this PHP
> function to escape your string: echo htmlspecialchars($yourstringhere);
>
> Regards,
> Samuel.
>
> -----Mensagem original-----
> De: sunil meena [mailto:sunil.extc2...@gmail.com]
> Enviada em: terça-feira, 11 de setembro de 2012 14:49
> Para: php-gene...@lists.php.net
> Assunto: [PHP] fets() escaping some characters
>
> Hello Everyone,
>
> Very new to the list.
>
> So I am trying to echo a string to the browser as follows -
>
> $str = "0x100092000 - 0x1000b7fff +com.apple.com (2.0 - 56)
> <BB91F4F8-3B1B-93C6-0D1A-E431E96F1BA3> /Library/PrivateFrameworks";
>
> echo $str;
>
> However the text between "<" and ">" i.e
> "BB91F4F8-3B1B-93C6-0D1A-E431E96F1BA3" doesn't get echoed instead all I get
> is "0x100092000 - 0x1000b7fff +com.apple.com (2.0 - 56)
> /Library/PrivateFrameworks";
>
> Anyone knows why this is happening?
>
> This happened while I was getting a line using fgets and hence I tried
> storing that string into a variable and outputting but it still doesn't
> show
> the characters between the "<>".
>
> Any help is highly appreciated.
>
> Thanks
>
> --
> Best Regards,
> Sunil Meena
>
>
--
Best Regards,
Sunil Meena
--- End Message ---
--- Begin Message ---
Or, if that string is the only thing you want to output and nothing else
you will set the correct content type for your output by putting
header('Content-Type: text/plain; charset=utf-8');
at the beginning of your script
Am 11.09.12 19:54, schrieb Samuel Lopes Grigolato:
> This issue has to do with HTML markup. You need to properly "escape"
> characters before sending them as text to the browser. Try to use this PHP
> function to escape your string: echo htmlspecialchars($yourstringhere);
>
> Regards,
> Samuel.
>
> -----Mensagem original-----
> De: sunil meena [mailto:sunil.extc2...@gmail.com]
> Enviada em: terça-feira, 11 de setembro de 2012 14:49
> Para: php-gene...@lists.php.net
> Assunto: [PHP] fets() escaping some characters
>
> Hello Everyone,
>
> Very new to the list.
>
> So I am trying to echo a string to the browser as follows -
>
> $str = "0x100092000 - 0x1000b7fff +com.apple.com (2.0 - 56)
> <BB91F4F8-3B1B-93C6-0D1A-E431E96F1BA3> /Library/PrivateFrameworks";
>
> echo $str;
>
> However the text between "<" and ">" i.e
> "BB91F4F8-3B1B-93C6-0D1A-E431E96F1BA3" doesn't get echoed instead all I get
> is "0x100092000 - 0x1000b7fff +com.apple.com (2.0 - 56)
> /Library/PrivateFrameworks";
>
> Anyone knows why this is happening?
>
> This happened while I was getting a line using fgets and hence I tried
> storing that string into a variable and outputting but it still doesn't show
> the characters between the "<>".
>
> Any help is highly appreciated.
>
> Thanks
>
> --
> Best Regards,
> Sunil Meena
>
>
--
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3
Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz
Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal
http://www.behnke.biz
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Is there a way to force a PHP script to bind to a prefixed IP?
Actually, while you can assign more IPs to Apache for listening,
assigning domains to specific IPs, it looks like any PHP script can
freely choose which IP to bind. Instead I'd love some domains are
permitted to open connections only from the domain IP.
In FreeBSD I do it easily, setting up dedicated jails for domains. But
how to do it simply using PHP on Linux?
Regards,
Tonino
------------------------------------------------------------
Inter@zioni Interazioni di Antonio Nati
http://www.interazioni.it to...@interazioni.it
------------------------------------------------------------
--- End Message ---