laucinieks Posted September 4, 2011 Report Share Posted September 4, 2011 (edited) Sveiki, vēlētos uzzināt vai ir alternatīvais variants priekš header('location: index.php'). Provēju javascripta window.location , bet viņš lapu pārlādē ļoti lēni. Ir vēl kādi citi alternatīvi varianti? AC, L. Edited September 4, 2011 by laucinieks Quote Link to comment Share on other sites More sharing options...
0 briedis Posted September 4, 2011 Report Share Posted September 4, 2011 Pāradresēšana servera vai klienta pusē? Quote Link to comment Share on other sites More sharing options...
0 laucinieks Posted September 4, 2011 Author Report Share Posted September 4, 2011 Briedi, vari iedot kādu piemēru, lūdzu? Quote Link to comment Share on other sites More sharing options...
0 briedis Posted September 4, 2011 Report Share Posted September 4, 2011 Kāpēc neizmanto header("Location.. ? Tāpēc ka headers arleady sent? Nu tad raksti kodu tā, lai nav "headers already sent", vai arī izmanto buferēšanu http://php.net/manual/en/function.ob-start.php Quote Link to comment Share on other sites More sharing options...
0 laucinieks Posted September 4, 2011 Author Report Share Posted September 4, 2011 (edited) Jā, jo headers already sent, un, lai visu pārrakstītu tā, lai nebūtu paies ilgs laiks + gan jau nāks klāt vēl citas kļūdas, jo tie header('location man ir ļoti daudz. Paskatīšos un paprovēšu buferēšanas variantu. Paldies :)! Edited September 4, 2011 by laucinieks Quote Link to comment Share on other sites More sharing options...
0 daGrevis Posted September 4, 2011 Report Share Posted September 4, 2011 Vienkārši raksti tā, ka skatus (fuj, tas ir HTML) izvada beigās. Sākumā skripts izdomā visu, ko vadīs ārā... tad izdrukā HTML. Nevis, ka izdomā kko, izvada kko, izdomā kko, izvada kko, izdomā kko... Laikam jāiet prasīt atbilde php.lv/f! Quote Link to comment Share on other sites More sharing options...
0 Vecteevs Posted September 4, 2011 Report Share Posted September 4, 2011 nu ja galīgi slinks vari ar meta refresh :D Quote Link to comment Share on other sites More sharing options...
0 Kemito Posted September 5, 2011 Report Share Posted September 5, 2011 Pievienojos "Vectēva" teiktajam par slinkumu. <meta http-equiv="refresh" content="2;url=http://webdesign.about.com/"> Quote Link to comment Share on other sites More sharing options...
Question
laucinieks
Sveiki, vēlētos uzzināt vai ir alternatīvais variants priekš header('location: index.php'). Provēju javascripta window.location , bet viņš lapu pārlādē ļoti lēni. Ir vēl kādi citi alternatīvi varianti?
AC,
L.
Edited by laucinieksLink to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.