Pergunta : você sabe uma função como $notes = nl2br ($_POST [“notas”]); no ASP?

você sabe uma função como $notes = nl2br ($_POST [“notas”]); no ASP? o uso do
I um formulário do email em meu Web site, mas em email vem com sem todos os breaklines. o PHP do
in lá é uma função para aquele $notes = nl2br ($_POST [“notas”]);
what sobre o ASP?
thank você.
class= > " desobstruído " do
soluções >Related class= href= " /Web_Development/Web_Languages-Standards/PHP/Q_26286851.html " title= " do sending " qRelatedParent " do HTML com PHP. As linhas de ruptura disapper quando eu usar este encabeçamento.

Resposta : você sabe uma função como $notes = nl2br ($_POST [“notas”]); no ASP?

Respostas… Depois que você vê este, ler por favor esta página com cuidado:
http://code.google.com/apis/maps/documentation/staticmaps/

(1) você pode controlar o tamanho da janela até os pixéis 640x640
(2) Google pode fazer este para você - o mapa de estática API pode aceitar fragmentos do endereço ou mesmo nomes dos marcos.  Ou você pode usar um geocoder.  Google e Yahoo oferecem geocoders.  Ver por favor a pequena notícia de código para um exemplo desta.
(3) Você pode traçar muitas posições diferentes em um mapa.  Eu afixarei uma resposta da continuação com um exemplo que mostra algumas das maneiras que você pode usar Google Maps API para afixar pushpins ou ícones múltiplos em um mapa.

As melhores considerações, ~Ray
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
    
    


    Yahoo/programa demonstrativo de Google SimpleGeoCoder
    
    
    
    Addr:  
    Cidade:  
    ST:   
    Fecho de correr:  
    
    
    
    
    endereço = $_GET [“a”];
$demo->city    = $_GET [“c”];
$demo->state   = $_GET [“s”];
$demo->zip     = $_GET [“z”];


TESTE DE // YAHOO! GEOCODER
$demo->geocodeYahoo ();
eco PHP_EOL. “YAHOO! ”;
print_rr ($demo);


TESTE DE // O GOOGLE GEOCODER
$demo->geocodeGoogle ();
eco PHP_EOL. “GOOGLE”;
print_rr ($demo);

// FEITO TODA
morrer ();


CLASSE SIMPLES DE // GEOCODER
classe SimpleGeoCoder
{
    // DECLARA OS DADOS DE ENTRADA
    público $location;

    O USO DE // ISTO PARA UMA PERGUNTA FREEFORM, OU USA AS PEÇAS
    público $address;
    público $city;
    público $state;
    público $zip;

    // DECLARA OS DADOS DE TRABALHO
    $precis confidencial;

    // DECLARA OS DADOS DE SAÍDA
    público $latitude;
    público $longitude;
    público $precision;
    público $warning;
    público $geocoder;

    // DECLARA O CONSTRUTOR
    __construct público da função ()
    {
        $this->latitude  = 0.0;
        $this->longitude = 0.0;
        $this->precision = FALSO;  // QUER UM VALOR DE 5 OU MAIS ELEVADO, É MAIS ALTAMENTE MELHOR
        $this->warning   = '';
        $this->geocoder  = '';
        unset ($this->precis);
    }

    // DECLARA O DATA-CLEANUP
    _cleanup confidencial da função ($str)
    {
        $str = preg_replace (“/[^ \” a-zA-Z0-9&! #$% () “+:? \/@, _ \. \ -]/', '', $str);
        guarnição do retorno (preg_replace (“/\ s \ s+/”, '', $str));
    }

    // DECLARA YAHOO! VERSÃO DO LABORIOSO
    geocodeYahoo público da função ()
    {
        se (! definido (“YAHOO_API ")) definir (“YAHOO_API”, “YAHOO_API ");
        $this->geocoder = “Yahoo! ”;
        $yahooUrl       = “http://local.yahooapis.com/MapsService/V1/geocode?&appid=”. YAHOO_API;

        // QUE VOCÊ PODE PEDIR UMA PERGUNTA FREEFORM
        se ($this->location! = '')
        {
            $yahooUrl. = “&location=”. urlencode ($this->_cleanup ($this->location));
        }

        // QUE VOCÊ PODE PEDIR PARTES INDIVIDUAIS DE UM ENDEREÇO
        mais
        {   $yahooUrl. = “&street=”. urlencode ($this->_cleanup ($this->address));
            $yahooUrl. = “&city=”   . urlencode ($this->_cleanup ($this->city));
            $yahooUrl. = “&state=”  . urlencode ($this->_cleanup ($this->state));
            $yahooUrl. = “&zip=”    . urlencode ($this->_cleanup ($this->zip));
        }

        // EXECUTA A PERGUNTA DE YAHOO GEOCODER
        NOTA DE // - USAR A SUPRESSÃO DO ERRO OU DESCASCARÁ PARA FORA A CHAVE DE YAHOO API - NO PEDIDO MAU DO HTTP 400 DOS RETORNOS DA FALHA
        se ($yfp = @fopen ($yahooUrl, “r "))
        {
            $yahooResponse = '';
            quando (! feof ($yfp))
            {
                $yahooResponse. = fgets ($yfp);
            }
            fclose ($yfp);
        }
        mais
        {
            FALSO do retorno;
        }

        // EXAMINA O RESULTADO
        se ($yahooResponse! = '') // NAO VAZIO, NÓS COMEÇ DADOS
        {
            $ydata    = SimpleXMLElement novo ($yahooResponse);

            A VERIFICAÇÃO DE // PARA TODA A MENSAGEM DE ERRO, SE NENHUM, EXTRAI OS PONTOS DE DADOS
            $yerror    = $ydata->Message;
            se (== de $yerror '')
            {
                $this->precis    = (corda) $ydata->Result [“precisão”];
                $this->warning   = (corda) $ydata->Result [“advertindo”];
                $this->latitude  = (corda) $ydata->Result->Latitude;
                $this->longitude = (corda) $ydata->Result->Longitude;

                // ESTAS INDICAÇÕES PODE SER USADO PARA RETORNAR ENDEREÇO NORMALIZADO
                $this->address   = (corda) $ydata->Result->Address;
                $this->city      = (corda) $ydata->Result->City;
                $this->state     = (corda) $ydata->Result->State;
                $this->zip       = (corda) $ydata->Result->Zip;

                // AJUSTOU A PRECISÃO A UM VALOR DO NÚMERO
                se (fecho de correr do == de $this->precis “")     {$this->precision = “5”; }
                se (rua do == de $this->precis “")  {$this->precision = “6”; }
                se (endereço do == de $this->precis “") {$this->precision = “8”; }
            }
            mais
            {
                FALSO do retorno;
            }
        }

        // NENHUM RESULTADO - ALGO É DOENTE EM YAHOO
        mais
        {
            FALSO do retorno;
        }

        do retorno RETIFICAR;
    } geocodeYahoo da função do FIM de //


    // DECLARA A VERSÃO DE GOOGLE DO LABORIOSO
    geocodeGoogle público da função ()
    {
        se (! definido (“GOOGLE_API ")) definir (“GOOGLE_API”, “GOOGLE_API ");
        $this->geocoder = “Google”;
        $googleUrl      = “http://maps.google.com/maps/geo?key=”. GOOGLE_API. “&output=csv”;
        se ($this->location! = '') // QUE VOCÊ PODE PEDIR UMA PERGUNTA FREEFORM
        {
            $googleUrl. = “&q=”. urlencode ($this->_cleanup ($this->location));
        }
        // que outro VOCÊ PODE PEDIR PARTES INDIVIDUAIS DE UM ENDEREÇO
        {
            $googleUrl. = “&q=”. urlencode (guarnição (
                    $this->_cleanup ($this->address)
            . ''. $this->_cleanup ($this->city)
            . ''. $this->_cleanup ($this->state)
            . ''. $this->_cleanup ($this->zip)
            ));
        }

        // EXECUTA A PERGUNTA DE GOOGLE GEOCODER
        se ($gfp = @fopen ($googleUrl, “r "))
        {
            $googleResponse = '';
            quando (! feof ($gfp))
            {
                $googleResponse. = fgets ($gfp);
            }
            fclose ($gfp);
        }
        mais
        {
            FALSO do retorno;
        }

        EXTRATO QUE DE // OS DADOS DO CSV AMARRAM
        $gdata    = explodem (“,”, $googleResponse);
        se ($gdata [0]! = O CÓDIGO DA RESPOSTA DE “200”) // DEVE SER “200” -- SE 602 - CÓDIGO POSTAL MAU OU ENDEREÇO INUSÁVEL
        {
            FALSO do retorno;
        }
        $this->precision = $gdata [1]; EXATIDÃO DE // GEOCODE - O CÓDIGO POSTAL = 5, UNS NÚMEROS MAIS ELEVADOS É MELHOR
        $this->latitude  = $gdata [2];
        $this->longitude = $gdata [3];
        do retorno RETIFICAR;
    } geocodeGoogle da função do FIM de //

} classe SimpleGeocoder da EXTREMIDADE de //



FUNÇÃO NÃO RELACIONADA DE // PARA FAZER A SAÍDA MOSTRAR A INFORMAÇÃO PÚBLICA SOMENTE
print_rr da função ($thing)
{
    $str = print_r ($thing, RETIFICAM);
    $arr = explodem (PHP_EOL, $str);
    $num = contagem ($arr) - 1;
    foreach ($arr como o => $txt de $ptr)
    {
        se (preg_match (“/: ] confidencial/”, $txt))
        {
            unset ($arr [$ptr]);
        }
    }
    o eco implode (PHP_EOL, $arr);
}
Outras soluções  
 
programming4us programming4us