I use Content-Disposition to open up a save as window, can I use an absolute path?

View: New views
2 Messages — Rating Filter:   Alert me  

I use Content-Disposition to open up a save as window, can I use an absolute path?

by googling1000 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Now, I have header("Content-Disposition: filename=file1.txt");

I tried to do header("Content-Disposition: filename=C:\Program Files\file1.txt");

But, it's not working. The save as window pops up, but it doesn't give the file the right filename (which is file1), and it doesn't know the type (which is .txt)

So, we can't use an absolute path with Content-Disposition?

Re: I use Content-Disposition to open up a save as window, can I use an absolute path?

by Stuart-47 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 22 May 2008, at 18:13, googling1000 wrote:

> Now, I have header("Content-Disposition: filename=file1.txt");
>
> I tried to do header("Content-Disposition: filename=C:\Program
> Files\file1.txt");
>
> But, it's not working. The save as window pops up, but it doesn't  
> give the
> file the right filename (which is file1), and it doesn't know the type
> (which is .txt)
>
> So, we can't use an absolute path with Content-Disposition?

Shockingly not, no. I can't actually think of a legitimate reason why  
you'd want to.

-Stut

--
http://stut.net/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php