Thread: [OT] PHP for ASP programmers
Hi: Does any one know of sites that show equivalent PHP function for their ASP counterparts? I've tried searching google but I could not find any. How does one "redirect" in PHP. I've use combination of echo and META tags, but I'm not sure if this is the standard practice for PHP programmers. Thank you very much, ludwig. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com
On Mon, 2003-02-03 at 23:16, Ludwig Lim wrote: > Hi: > > Does any one know of sites that show equivalent PHP > function for their ASP counterparts? I've tried > searching google but I could not find any. > > How does one "redirect" in PHP. I've use > combination of echo and META tags, but I'm not sure if > this is the standard practice for PHP programmers. I don't know about ASP -> PHP, sorry. I redirect in PHP as: header( "Location: http://some.other.website/page" ); I had to abuse one of our younger programmers recently for using redirects as if they were GOTO's - I sincerely hope you're not going to do that with it :-) Cheers, Andrew. -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ ---------------------------------------------------------------------
Hi > Does any one know of sites that show equivalent PHP > function for their ASP counterparts? I've tried > searching google but I could not find any. Don't know about this. > How does one "redirect" in PHP. I've use > combination of echo and META tags, but I'm not sure if > this is the standard practice for PHP programmers. I use: header("Location: script.php"); // Before any output to the page or it will give "headers already sent" error. Check the docs. Adrian Tineo
You go: header("Location: www.postgresql.org"); exit; Chris On Mon, 3 Feb 2003, Ludwig Lim wrote: > > Hi: > > Does any one know of sites that show equivalent PHP > function for their ASP counterparts? I've tried > searching google but I could not find any. > > How does one "redirect" in PHP. I've use > combination of echo and META tags, but I'm not sure if > this is the standard practice for PHP programmers. > > Thank you very much, > ludwig. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >
remember that u can have nothing exported (not even a space) to the web browser or u will get an error "header already send". if u need to redirect after sending some thing to the browser i use (don't know any other way) javascript window.location.href('<url>'); -----Original Message----- From: Christopher Kings-Lynne [mailto:chriskl@familyhealth.com.au] Sent: Monday, February 03, 2003 2:45 PM To: Ludwig Lim Cc: PostgreSQL Mailing List Subject: Re: [PHP] [OT] PHP for ASP programmers You go: header("Location: www.postgresql.org"); exit; Chris On Mon, 3 Feb 2003, Ludwig Lim wrote: > > Hi: > > Does any one know of sites that show equivalent PHP > function for their ASP counterparts? I've tried > searching google but I could not find any. > > How does one "redirect" in PHP. I've use > combination of echo and META tags, but I'm not sure if > this is the standard practice for PHP programmers. > > Thank you very much, > ludwig. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
On Mon, Feb 03, 2003 at 02:16:39AM -0800, Ludwig Lim wrote: > > Hi: > > Does any one know of sites that show equivalent PHP > function for their ASP counterparts? I've tried > searching google but I could not find any. Try using ASP2PHP with lists of ASP function names - that should help a bit. See http://asp2php.naken.cc/ Cheers! -- Zak Greant <zak@mysql.com> | MySQL Advocate | http://zak.fooassociates.com "Gosh, Batman. The nobility of the almost-human porpoise." --Robin, the Boy Wonder
On Mon, Feb 03, 2003 at 02:16:39 -0800, Ludwig Lim <lud_nowhere_man@yahoo.com> wrote: > > How does one "redirect" in PHP. I've use > combination of echo and META tags, but I'm not sure if > this is the standard practice for PHP programmers. Using a meta-refresh header in html to do redirection isn't a good idea. The correct way is to use a location header in the response and an appropiate response code (indication if the redirection is temporary or permanent).
Not really documentation but I suppose you could run asp2php (search for it on freshmeat.net) and look at the converted output. Cheers, Steve On Monday 03 February 2003 2:16 am, Ludwig Lim wrote: > Hi: > > Does any one know of sites that show equivalent PHP > function for their ASP counterparts? I've tried > searching google but I could not find any. > > How does one "redirect" in PHP. I've use > combination of echo and META tags, but I'm not sure if > this is the standard practice for PHP programmers. > > Thank you very much, > ludwig. > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html