>PHP: Lista de Protocolos/Envolturas Soportadas - Manual

MANUAL DE PHP

(y algo mas)windsurf pozo izquierdo
Google
search for in the  
ELMARRAJO.COM mysql bulma desarrollo web linux fedora html ayuda

windsurf mercedes camper

Ap茅ndice M. Lista de Protocolos/Envolturas Soportadas

La siguiente es una lista de los varios protocolos estilo URL que PHP tiene integrado para su uso con las funciones del sistema de archivos, tales como fopen() y copy(). Adicionalmente a estas envolturas, y a partir de PHP 4.3.0, usted puede escribir sus propias envolturas usando scripts PHP y stream_wrapper_register().

Sistema de archivos

Todas las versiones de PHP. Usada expl铆citamente mediante file:// a partir de PHP 4.3.0

  • /ruta/hacia/archivo.ext

  • ruta/relativa/hacia/archivo.ext

  • archivoEnDirActual.ext

  • C:/ruta/hacia/archivo_win.ext

  • C:\ruta\hacia\archivo_win.ext

  • \\servidor_smb\recurso_compartido\ruta\hacia\archivo_win.ext

  • file:///ruta/hacia/archivo.ext

file:// es la envoltura predeterminada usada por PHP, y representa el sistema de archivos local. Cuando se especifica una ruta relativa (una ruta que no comienza con /, \, \\, o una letra de unidad en windows), la ruta provista ser谩 aplicada contra el directorio de trabajo actual. En muchos casos 茅ste es el directorio en el cual reside el script, a menos que haya sido modificado. Al usar la sapi CLI, 茅ste es, por defecto, el directorio desde donde fue llamado el script.

Con algunas funciones, como fopen() y file_get_contents(), include_path puede usarse opcionalmente tambi茅n para las b煤squedas de rutas relativas.

Tabla M-1. Resumen de Envoltura

AtributoSoporte
Restricci贸n por allow_url_fopen.No
Permite LecturaSi
Permite EscrituraSi
Permite Adici贸nSi
Permite Lectura y Escritura Simult谩neaSi
Soporte stat()Si
Soporte unlink()Si
Soporte rename()Si
Soporte mkdir()Si
Soporte rmdir()Si



add a note add a note User Contributed Notes
Lista de Protocolos/Envolturas Soportadas
ben dot johansen at gmail dot com
29-Aug-2006 11:02
Example of how to use the php://input to get raw post data

//read the raw data in
$roughHTTPPOST = file_get_contents("php://input");
//parse it into vars
parse_str($roughHTTPPOST);

if you do readfile("php://input") you will get the length of the post data
ben dot johansen at gmail dot com
29-Aug-2006 12:33
In trying to do AJAX with PHP and Javascript, I came upon an issue where the POST argument from the following javascript could not be read in via PHP 5 using the $_REQUEST or $_POST. I finally figured out how to read in the raw data using the php://input directive.
  
Javascript code:
=============
     //create request instance     
     xhttp = new XMLHttpRequest();
     // set the event handler
     xhttp.onreadystatechange = serviceReturn;
     // prep the call, http method=POST, true=asynchronous call
     var Args = 'number='+NbrValue;
     xhttp.open("POST", "http://<?php echo $_SERVER['SERVER_NAME'] ?>/webservices/ws_service.php", true);
     // send the call with args
     xhttp.send(Args);

PHP Code:
   //read the raw data in
   $roughHTTPPOST = file_get_contents("php://input");
   //parse it into vars
   parse_str($roughHTTPPOST);
heitorsiller at uol dot com dot br
07-Jul-2006 07:55
For reading a XML stream, this will work just fine:
<?php

$arq
= file_get_contents('php://input');

?>

Then you can parse the XML like this:

<?php

$xml
= xml_parser_create();

xml_parse_into_struct($xml, $arq, $vs);

xml_parser_free($xml);

$data = "";

foreach(
$vs as $v){

       if(
$v['level'] == 3 && $v['type'] == 'complete')
              
$data .= "\n".$v['tag']." -> ".$v['value'];
}

echo
$data;

?>

PS.: This is particularly useful for receiving mobile originated (MO) SMS messages from cellular phone companies.
opedroso at NOSPAMswoptimizer dot com
12-Apr-2006 11:07
php://input allows you to read raw POST data. It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives.

Example use:

$httprawpostdata = file_get_contents("php://input");

When reading a base64 encoded stream using php://input, be aware that you do not need to decode it, it will automatically be done for you.
nyvsld at gmail dot com
27-Nov-2005 10:28
php://stdin supports fseek() and fstat() function call,
while php://input doesn't.
drewish at katherinehouse dot com
24-Sep-2005 11:50
Be aware that contrary to the way this makes it sound, under Apache, php://output and php://stdout don't point to the same place.

<?php
$fo
= fopen('php://output', 'w');
$fs = fopen('php://stdout', 'w');

fputs($fo, "You can see this with the CLI and Apache.\n");
fputs($fs, "This only shows up on the CLI...\n");

fclose($fo);
fclose($fs);
?>

Using the CLI you'll see:
  You can see this with the CLI and Apache.
  This only shows up on the CLI...

Using the Apache SAPI you'll see:
  You can see this with the CLI and Apache.
chris at free-source dot com
26-Apr-2005 12:52
If you're looking for a unix based smb wrapper there isn't one built in,  but I've had luck with http://www.zevils.com/cgi-bin/viewcvs.cgi/libsmbclient-php/ (tarball link at the end).
nargy at yahoo dot com
24-Sep-2004 03:16
When opening php://output in append mode you get an error, the way to do it:
$fp=fopen("php://output","w");
fwrite($fp,"Hello, world !<BR>\n");
fclose($fp);
aidan at php dot net
27-May-2004 03:34
The contants:

* STDIN
* STDOUT
* STDERR

Were introduced in PHP 4.3.0 and are synomous with the fopen('php://stdx') result resource.
lupti at yahoo dot com
29-Nov-2003 02:04
I find using file_get_contents with php://input is very handy and efficient. Here is the code:

$request = "";
$request = file_get_contents("php://input");

I don't need to declare the URL filr string as "r". It automatically handles open the file with read.

I can then use this $request string to your XMLparser as data.
sam at bigwig dot net
15-Aug-2003 08:02
[ Editor's Note: There is a way to know.  All response headers (from both the final responding server and intermediate redirecters) can be found in $http_response_header or stream_get_meta_data() as described above. ]

If you open an HTTP url and the server issues a Location style redirect, the redirected contents will be read but you can't find out that this has happened.

So if you then parse the returned html and try and rationalise relative URLs you could get it wrong.

Citas célebres

La sabiduría viene de escuchar; de hablar, el arrepentimeinto.

Proverbio italiano
Citas en tu mail
©Contenidos Gratis

Ilusiones Opticas
ilusion_optica_008.jpg
Contenidos Web

Chiste de... M閐icos
Confianza

- Pues sabe, el otro día fuí al médico y me habló de usted.

- ¿Y qué le dijo?

- Que ya que teníamos un poco de confianza y me podia hablar de tú.
Chistes en tu mail
©ContenidosGratis

Humor Gráfico
humor_grafico_033.jpg
Contenidos Web

Inicio | Acción | Estrategia | Palabras | Puzzles | Solitarios | Foro Trucos
Cake ManiaCake Mania
Jugadores: 6835
Categoría del juego: Acción
Objetivo del juego: Ayuda a Jill a recuperar la pasteler韆 de su abuela llevando su propia pasteler韆; consigue clientes y gana dinero.
Rainbow WebRainbow Web
Jugadores: 2199
Categoría del juego: Puzzles
Objetivo del juego: Rompe un pegajoso hechizo y salva un reino de fantas韆 en Rainbow Web. Tendr醩 toneladas de diversi髇 mientras juegas a este m醙ico desaf韔 para la mente.
Mahjongg FortunaMahjongg Fortuna
Jugadores: 12462
Categoría del juego: Solitarios
Objetivo del juego: Velocidad y habilidad mental son las armas más importantes en esta versión de un antiguo juego asiático. Despeja el tablero lo antes posible haciendo clic en las fichas iguales y gánate la fama eterna de la puntuación más alta.
Chainz 2Chainz 2
Jugadores: 6955
Categoría del juego: Puzzles
Objetivo del juego: Entra en el mundo de las combinaciones con Chainz 2: Relinked, emocionante secuela del exitazo del a駉 pasado, Chainz. Gira eslabones y crea combinaciones de 3 m醩.
DeliciousDelicious
Jugadores: 4405
Categoría del juego: Acción
Objetivo del juego: 縀res un as de la multitarea? 縌uieres que tus clientes est閚 contentos? ues Delicious es tu juego! Sacia el apetito de los clientes y tenlos contentos; o te arriesgues!
BookwormBookworm
Jugadores: 4568
Categoría del juego: Palabras
Objetivo del juego: Junta las letras para formar palabras. ¡Las palabras más largas valen más puntos!
ZumaZuma
Jugadores: 4976
Categoría del juego: Acción
Objetivo del juego: Controla el 韉olo de la rana de piedra de los antiguos Zuma en este intrigante enigma de acci髇. ispara bolas para formar conjuntos de tres, pero si dejas que lleguen a la calavera dorada morir醩!
Jewel of AtlantisJewel of Atlantis
Jugadores: 3798
Categoría del juego: Puzzles
Objetivo del juego: Descubre la ciudad hundida de la Atl醤tida y busca valiosos tesoros. Viaja m醩 all de las profundidades del mar y vive trepidantes aventuras en Jewel of Atlantis.
Jewel QuestJewel Quest
Jugadores: 3727
Categoría del juego: Puzzles
Objetivo del juego: Convierte la arena de la antigua selva en oro tan r醦ido como puedas juntando grupos de 3 elementos. os grupos m醩 grandes valen m醩 puntos!
Bejeweled 2Bejeweled 2
Jugadores: 3659
Categoría del juego: Puzzles
Objetivo del juego: Con cuatro modos de juego 鷑icos y fascinantes, nuevas piezas de juego explosivas e imponentes fondos planetarios, Bejeweled 2 es mucho m醩 adictivo que nunca.
Contenidos gratis en tu webSiguiente >>

Fotos divertidas
fotos_increibles_0415.jpg
Contenidos Web
microrobots avion deportes riesgo recetas cocina canaria juegos online gratis moto motociclismo horoscopos naranjas valencianas surf canarias monta駃smo ciudades turismo postales gratis library Horoscopos Diarios Windsurf Canarias
fregadero microondas placa electrica ba駉preparar camper pantalla plananevera compresor electricacamper fiat ducato camper ba駉 quimicomampara enrollable ba駉camper aire climatizadofurgoneta surf windsurffurgoneta surf windsurftelevisor furgonetas camperfurgonetas camper cama

Sudoku del día
Nivel de dificultad: Fácil



Cómo jugar:
El juego consiste en colocar los números del 1 al nueve de tal forma que no se repita el mismo número en la columna, fila y caja (bloques 3x3 enmarcados).

©Contenidos Gratis | Sudoku en tu mail
Sucedió el...

30 de agosto de 1617

Fallece Santa Rosa de Lima, por la que se celebra el "Día de la Patrona de América".
Efemérides en tu mail
©Contenidos Gratis
windsurf canarias youtube porno canarias baleares valencia madrid