|
Posted by matt on 11/15/06 13:48
Pedro Graca wrote:
> Pedro Graca wrote:
>
>>And I'd use like this:
>>
>> <?php
>
>
> <snip>
>
>> # display file list
>> foreach ($_SESSION['files'] as $k=>$f) {
>> echo '<a href="dl.php?id=', $k, '">', $f, "</a><br>\n";
>
>
> No need to hard code the script name here!
>
> echo '<a href="', $_SERVER['PHP_SELF'], '?id=', $k, '">', $f, "</a><br>\n";
>
>
>> }
>> ?>
>
>
Hmm I am getting an error to do with headers already being set?
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
/public_html/file_download.php:1) in /public_html/file_download.php on
line 12
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
/public_html/file_download.php:1) in /public_html/file_download.php on
line 12
Warning: Invalid argument supplied for foreach() in
/public_html/file_download.php on line 27
Any ideas?
Navigation:
[Reply to this message]
|