millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 to es jau izdariiju ... bet nekaa . Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 25, 2008 Report Share Posted March 25, 2008 (edited) un kur pats include??? edit: failus case`os vajag includot ... Kaas taas par mulkjiibam?? tieshi tas ir nepareizi, jo sanak sajaukt PHP kodu ar HTML vienaa putraa .... tas kods paliek galiigi nelasams ... Edited March 25, 2008 by Grey_Wolf Link to comment Share on other sites More sharing options...
777 Posted March 25, 2008 Report Share Posted March 25, 2008 millers, tu labak panem gramatu, un drusku palasi par if, else, switch ... ja tu palasisi gramatu, tev pasham bus mazak jautajumu, un tev bus ari skaidraks kods ... Link to comment Share on other sites More sharing options...
millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 iedod kadu graamatu :)) .. Link to comment Share on other sites More sharing options...
777 Posted March 25, 2008 Report Share Posted March 25, 2008 (edited) Grey, nu ka kuram :) es savu kodu varu lasit mierigi :) viss ok case 'video': include("video.php"); break; millers, kaut vai http://lv.php.net manuali ... bet zinu ir daudz labu anglju un krievu gramatas PHP+MYSQL Edited March 25, 2008 by 777 Link to comment Share on other sites More sharing options...
millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 Grey_Wolf nu labi ja tas script aizietu vinjs butu vieglaak parlasaams .. bet ka lai es dabonu gatavu to lai kas atrodas index.php faila neuzradas citos linkos .. ? Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 25, 2008 Report Share Posted March 25, 2008 (edited) millers -->kaa tas ir??? neuzradaas citos failos??? nu ja tu palaid index.php un tur ieksa ir HTMLs teiksim blaa blaa bla Kaa vinsh var paradiities citos failos??? Neka ... --- parasti shadu shemu izmanto lai nebutu jaduble elementi kas ir VISAAS saita lapaas --> virsrakstus/ logo utt.... pashu saturu glabaa tajos failos ko includosi .... un tas arii ir viss..... arii index_inc.php vajag atseviskji ... pasa index tikai ... PHP kods + <html> <body> Kautkaas kas ir visaas lapas augsa <br> <?php include($saturs); ?> <br> apaksa kas ir vienada vissas lapaas... </body> </html>[code] un includojamie faili bla.php [code] SHIS IR BLA.PHP bla2.ph SHIS IR BLA2.php ....... Kur problema? edit: 777 --> es biju domajis ka faili kas satur HTML labak ir veidot atseviskju includi. Tur kur atrodas PHP kods --> protams ka starp case: savadak jau var 'aizbraukt' viss kods.... (ja faila buus kkadi defineti mainiigie utt, kuri talak buus jaizmanto ) Edited March 25, 2008 by Grey_Wolf Link to comment Share on other sites More sharing options...
millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 man ir lieta tada es piemeram ierakstu index.php faila <p>Sveicinati visi</p> saglabaaju atveru index viss oke sis text raaadas .. pectam atveru localhost/uo/?tag=news tur piemeeram rakstiti visi jaunumi un pasaaa apaksaa rakstits sveicinati visi kautvaj taani news file nava nemaz kkas tads rakstits atveru muziku ari rakstits sveicinati visi .. vienalga kuru Link weba ver buss rakstits sveicinati visi .. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 25, 2008 Report Share Posted March 25, 2008 millers --> izlasi kartigi manu ieprieksejo postu !!!!! Nepieleca?? Izlasi velreiz ... Liidz atrodi sadu tekstu: Kautkaas kas ir visaas lapas augsa Vai sadu : apaksa kas ir vienada vissas lapaasv tagat pieleca? Link to comment Share on other sites More sharing options...
millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 Tuulit meiginasu saprasti =D Link to comment Share on other sites More sharing options...
millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 moska nesaprati mani nez isti vai ari es tevi nesapratu man vajag taa lai tas text kas man uzradas index.php neuzradiitos citos linkos.. lai tas text man buuutu tikai index.php failaa ... nevis kkada muzikaa vai kkur citur. Link to comment Share on other sites More sharing options...
mounkuls Posted March 25, 2008 Report Share Posted March 25, 2008 (edited) Ko nesaproti? Tajā index.php tu sākumā ieliec <p>Sveicinati visi</p> un tad atkarībā no linka inkludo klāt atticīgo failu kautkas.php.... Protams, ka tas <p>Sveicinati visi</p> paliks tajā pašā vietā kur bijis, tu nevis pārej uz citu failu, bet inkludo jau esošajā klāt citu saturu:) arī tas get.php ir tāds nevisai... tur man liekas html vispār neprasās. Man liekas millers neizprot include(). Darbība notiek visu laiku index.php failā iekļaujot citus php failus, nevis pārejot uz tiem citiem php failiem(nezinu cik tas tehniski precīzi). Edited March 25, 2008 by mounkuls Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 25, 2008 Report Share Posted March 25, 2008 millers --> nu kas nevari uztaisiit failu index_include.php un tur visu to tekstu sastuukjeet ????? un no index.php vinju vispar aizvakt???? un kaa tev skhiet cik erti ir katra falaa rakstii : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> ..... un </body></html> ??? ka arii daljas kas atkartojas??? --- Link to comment Share on other sites More sharing options...
millers Posted March 25, 2008 Author Report Share Posted March 25, 2008 vinjs tikunta uzrada jo tagi man iet caur index.php .. Link to comment Share on other sites More sharing options...
mounkuls Posted March 26, 2008 Report Share Posted March 26, 2008 (edited) es taisu tā parasti, tiesa gan esmu switch un case iecienijis: index.php fails: <?php //definēju ko man vajag php mainīgajiem // pārbaudu ievadīto un paņemu mainīgajam vērtības ?> HTML sākums un tagos varu izmantot <?=$variable?> lai piemēram norādītu CSS failu ar php vai jebkuru citu mainīgu vērtību <body> Tālāk atkarībā no plānotā vai nu html vēl vai atkal php <?php if(isset($_GET['atslega'])) $atslega=$_GET['atslega']; //te gan vēl jāpārbauda ievadītais/man patīk skaitļi, pietiek ar (int) noteikt integer/ switch($atslega){ case 'atslegas_kods' : include('kautkads.php'); break; case 'cits_atslegas_kods' : include('kautkads_cits.php'); break; .... .... .... default: visi tie linki millera gadijumā break; } exit(); ?> HTML beigās, ja vajag ko nobeigumam.. </body> </html> Nu tā kautkā...... Katrā ziņa php lietot tur, kur vajag php un HTML kur nemainās saturs. Edited March 26, 2008 by mounkuls Link to comment Share on other sites More sharing options...
Recommended Posts