Hi Friends , I saw the discussion and think that we dont refer to material
before helping anyone.
pls pls dont give half or wrong information , just check it before you give
anyhelp to anyone.
so yogita i answered your question but when i saw the answers you got for your
question couldnot stop this
so pls try think , it works 100% sure.
<?php
// load content into var
$filecontent="Some text/code im creating in the script";
$downloadfile="somefile.txt";
header("Content-disposition: attachment; filename=$downloadfile");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".strlen($filecontent));
header("Pragma: no-cache");
header("Expires: 0");
?>
tell me if it works
<[EMAIL PROTECTED]> wrote:
All of these will either open or download the post-processed page
(e.g. an HTML page, not the PHP code). PHP is specifically designed
(integrated with the server) to process the PHP part of the page
before sending anything. So no matter what you do, you cannot
download the PHP itself except possibly by changing the link to an
FTP, (but I don't think that will work), or streaming the PHP page to
the user by sending the content-type header. Even then, it won't
necessarily work.
If it's your server, and you want to show the content of the script,
use .phps rather than .php (you could even use a PHP script to
dynamically write out a .phps file and redirect to it).
If it's not your server, you shouldn't be trying to download someone
elses' work. Email them and ask.
Mark
--- Ian Bambury <[EMAIL PROTECTED]> wrote:
> Right-click | "Save target as..."
>
>
> On 06/11/05, Wes G <[EMAIL PROTECTED]> wrote:
> >
> > Try shift click
> >
> > On 11/5/05, arunmohan kamalakannan <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > > Try to give full name in that href. For example:
> > > <a
> > > href='/home/bin/usr/member/example.php'>example.php</a>
> > >
> > > See the above code here we are not giving
> > > http://www.hostname.com/member/example.php. We only
> > > give linux folder name as above.
> > >
> > > Try it. I hope it works clearly.
> > >
> > > With regards,
> > > Arun
> > > With regards,
> > > Arun
> > > --- Yogita <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > ---------------------------------
> > > How to download file [.php] in php ?
> > >
> > > When we click on link.............it sould ask for
> > > save option....i.e diaplog box.
> > >
> > > Not open in same browser...........
> > >
> > > Does anybody know ?
> > >
> > >
> > >
> > > Yogita
> > >
> > >
> > > ---------------------------------
> > > Yahoo! FareChase - Search multiple travel sites in
> > > one click.
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> > > Community email addresses:
> > > Post message: [email protected]
> > > Subscribe: [EMAIL PROTECTED]
> > > Unsubscribe: [EMAIL PROTECTED]
> > > List owner: [EMAIL PROTECTED]
> > >
> > > Shortcut URL to this page:
> > > http://groups.yahoo.com/group/php-list
> > >
> > >
> > >
> > > ---------------------------------
> > > YAHOO! GROUPS LINKS
> > >
> > >
> > > Visit your group "php-list" on the web.
> > >
> > > To unsubscribe from this group, send an email to:
> > > [EMAIL PROTECTED]
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo!
> > > Terms of Service.
> > >
> > >
> > > ---------------------------------
> > >
> > >
> > >
> > >
> > >
> > >
> > > __________________________________________________________
> > > Enjoy this Diwali with Y! India Click here
> > > http://in.promos.yahoo.com/fabmall/index.html
> > >
> > >
> > > Community email addresses:
> > > Post message: [email protected]
> > > Subscribe: [EMAIL PROTECTED]
> > > Unsubscribe: [EMAIL PROTECTED]
> > > List owner: [EMAIL PROTECTED]
> > >
> > > Shortcut URL to this page:
> > > http://groups.yahoo.com/group/php-list
> > >
> > >
> > > ------------------------------
> > > YAHOO! GROUPS LINKS
> > >
> > >
> > > - Visit your group
> "php-list<http://groups.yahoo.com/group/php-list>"
> > > on the web.
> > > - To unsubscribe from this group, send an email to:
> > > [EMAIL PROTECTED]<
> >
>
[EMAIL PROTECTED]<http://[EMAIL PROTECTED]/?subject=Unsubscribe>
> > >
> > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > > Service <http://docs.yahoo.com/info/terms/>.
> > >
> > >
> > > ------------------------------
> > >
> >
> >
> >
> > --
> > Get a laptop for only $5
> > http://www.ezlaptop.com/index.php?ref=43004
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > Community email addresses:
> > Post message: [email protected]
> > Subscribe: [EMAIL PROTECTED]
> > Unsubscribe: [EMAIL PROTECTED]
> > List owner: [EMAIL PROTECTED]
> >
> > Shortcut URL to this page:
> > http://groups.yahoo.com/group/php-list
> >
> >
> > ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> > - Visit your group
> "php-list<http://groups.yahoo.com/group/php-list>"
> > on the web.
> > - To unsubscribe from this group, send an email to:
> >
>
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > ------------------------------
> >
>
>
> [Non-text portions of this message have been removed]
>
>
Mark Weinstock
[EMAIL PROTECTED]
***************************************
You can't demand something as a "right" unless you are willing to fight to
death to defend everyone else's right to the same thing.
***************************************
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "php-list" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/