salvadordalii Posted March 29, 2004 Report Share Posted March 29, 2004 (edited) Lapaa vajag piesaistiit (include) vienu citu lapu, tachu tai (pirms ievietoshanas) ir jaapmaina 1 rindinja uz kautko citu... Kur atradiisies rindinja nav zinaams, tachu zinaams, kaada taa buus... Piemeeram. Dotaa lapa ir <meta http-equiv="Content-Language" content="lv"> <p>Viens</p> <p>Divi</p> <p> <img border="0" src="../htmleng/par.gif" width="230" height="148"></p> <p><a href="linx1">Trīs</a></p> Bet man vajag, lai manaa php failaa inkluudo <meta http-equiv="Content-Language" content="lv"> <p>Viens</p> <p>Un divi apmainam ar shito textu</p> <p> <img border="0" src="../htmleng/par.gif" width="230" height="148"></p> <p><a href="linx1">Trīs</a></p> Vai tas vispaar ir iespeejams? Un ja jaa, tad kaa? Edited March 29, 2004 by salvadordalii Link to comment Share on other sites More sharing options...
des Posted March 29, 2004 Report Share Posted March 29, 2004 Includi aizvieto ar: $fd = fopen('incluudojamais.php', "rb"); $t = fread($fd, filesize($fn)); fclose($fd); $t=str_replace('divi','aizvietojam divi',$t); echo $t; ; Link to comment Share on other sites More sharing options...
des Posted March 29, 2004 Report Share Posted March 29, 2004 Un attieciigi, ja includojamais fails ir patiess php, t.i., tas satur reaalas php komandas, tad echo $t; jaaaizvieto ar eval ($t); Link to comment Share on other sites More sharing options...
Recommended Posts