GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Any PHP experts around? (https://gfy.com/showthread.php?t=699608)

Danielle 01-26-2007 01:26 AM

Any PHP experts around?
 
What is correct????

header("Content-Disposition: attachment; filename=\"$filename\"");

or

header("Content-Disposition: attachment; filename=$filename");

Hugs,
Danielle

Danielle 01-26-2007 01:54 AM

bump for the php expert mourning crew:)

Hugs,
Danielle

mlove 01-26-2007 01:59 AM

according to php.net/header the correct syntax is


PHP Code:

header('Content-Disposition: attachment; filename="$filename"'); 


Nookster 01-26-2007 02:01 AM

yes, like mlove said. double quotes nested inside single quotes. :2 cents:

woj 01-26-2007 02:08 AM

Quote:

Originally Posted by mlove (Post 11793854)
according to php.net/header the correct syntax is


PHP Code:

header('Content-Disposition: attachment; filename="$filename"'); 


come on, that can't be correct... $filename won't work if it's inside single quotes...

you need this:
header("Content-Disposition: attachment; filename=\"$filename\"");

mlove 01-26-2007 02:11 AM

Quote:

Originally Posted by woj (Post 11793890)
come on, that can't be correct... $filename won't work if it's inside single quotes...

you need this:
header("Content-Disposition: attachment; filename=\"$filename\"");

ahh yeah, forgot about that.

Danielle 01-26-2007 02:17 AM

So this is correct?

header("Content-Disposition: attachment; filename=\"$filename\"");

Hugs,
Danielle

Danielle 01-26-2007 02:24 AM

Are the "\" back slashes needed?

Hugs,
Danielle

woj 01-26-2007 02:27 AM

Quote:

Originally Posted by Danielle (Post 11793912)
So this is correct?

header("Content-Disposition: attachment; filename=\"$filename\"");

Hugs,
Danielle

looks correct, but why are you sweating about the details? just try both versions in IE and Firefox and if it works in both, you are good to go :winkwink: :thumbsup

Juicy D. Links 01-26-2007 02:30 AM

header("Content-Disposition: attachment; filename=\"$filename\wojismydad"if a=b then JDL is A end");

Danielle 01-26-2007 02:53 AM

Quote:

Originally Posted by woj (Post 11793936)
looks correct, but why are you sweating about the details? just try both versions in IE and Firefox and if it works in both, you are good to go :winkwink: :thumbsup

Both versions seem to work.... So I am trying to find out what version is correct. :)

Hugs,
Danielle

Chariott 01-26-2007 03:13 AM

There is no difference. Quotes allow you to send file which contains spaces in its name. Nothing more.

Chariott 01-26-2007 03:22 AM

You can find original information here: http://www.ietf.org/rfc/rfc2183.txt


All times are GMT -7. The time now is 11:55 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123