User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,859 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,402 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1821 | Replies: 18
Join Date: Nov 2007
Posts: 5
Reputation: jimmyvazquez is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jimmyvazquez jimmyvazquez is offline Offline
Newbie Poster

Re: button (Save target as)

  #11  
Dec 1st, 2007

Thanks, But what will these functions do :
$fp=fopen("$dwnld", "r");
fpassthru($fp);[/quote]


Mira, se supone que quieres bajar un archivo en estes vaso .zip, entonces este script lo debes de poner en la carpeta donde estan los archivos o concatenarle la ruta.
Ahora, lo que hace esta linea $fp=fopen("$dwnld", "r"); supongo que ya sabes, pero bueno crea un descriptor de archivo llamado fp ($fp), abre el archivo que se encuentre el nombre en $dwnld como solo lectira, lo que hace el fpassthru($fp); es leer todo lo que tenga el archivo y cuando llega al final de archivo lo cierra.. es lo que hace.. pero utiliza te pido que lo pruebes... lo que hace es bajar en este caso el archivo .zip que le pases en la variable $dwnld.

Hay otra opcion para esto pero si el usuario tiene instalos los plugins para poder abrir los archivos los visualizara en el browser, pero esto no seria automatico.. tendrias ke dar clic..

<A href="ruta/archivo" >texto</A>

no se si se pueda jamas lo he probado ya que son nuevo en php pero no se si puedas hacerlo asi..

header('location: http://127.0.0.1/archivos/'.$dwld);

fin repito no lo he calado.. pero podrias intentarlo.. espero y te ayude con eso.. :p
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 8:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC