![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| That didn't work. I thought about a header("Location: nextpage.html"); But I don't know how to make it run after the file downloads. Scott <burgermeister01@insightbb.com> wrote in message news:RTiVa.3081$YN5.2390@sccrnsc01... All you have to do is put the html after the php. The header function won't work if you use it after any output has started. Hope that helps. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/03 | |||
| Advertisements |
| | #2 | ||
| Hmm, thats weird. Maybe you should try putting the html inside the script. See if that works. I'll try to help you, but its kind of like the blind leading the blind hehe. | |||
| | #3 | ||
| Scott Brown wrote: > That didn't work. I thought about a header("Location: nextpage.html"); > But I don't know how to make it run after the file downloads. A Very Basic Introduction To HTTP: - Headers identify the contents about to be sent. Therefore, you have to send the headers first - to the browser can determine how to handle it - After the headers are sent, the contents are sent So trying to use the command Header("Location: ...") after sending content is no use. PHP rightfully doesn't let you do this, as it (best case) would produce strange behaviour from the browser. So if you want something to happen after the content is sent to the browser, you're stuck with a couple of options: - Either write some client side logic (JavaScript's document.location.replace(anotherURL) would do the trick if you're in HTML - Or send another header. You could try using the following command somewhere in your headers: Header("Refresh","<time_to_wait_before_reloading_p age>,url=<enter_another_url_here"); This would instruct the browser to "reload" the page after n seconds, and to use the URL supplied when "reloading". So what happens is, first the file is downloaded, then after n seconds, the browser sends a request to the URL you supplied. HTH, -- Marius | |||
| Featured Websites | ||||
|
![]() |
| Tags: download, file, problemheaders, script |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Download Rater Script? | WeeNeR | PHP | 3 | 07-01-2007 3:53 PM |
| Looking for a way to generate an HTML file download page... | Jay Vance | PHP | 6 | 07-01-2007 3:40 PM |
| File upload problem | Fishter | PHP | 8 | 07-01-2007 3:39 PM |
| new file problem | CoolSnake37 | Graphics in general | 6 | 06-11-2007 11:08 PM |
| Webpage script problem. | eric | Website Coding | 1 | 08-04-2006 8:15 PM |
| Featured Websites | ||||
|