Jackal Posted July 26, 2007 Report Share Posted July 26, 2007 (edited) Ir šāda funkcija function url($url){ return $_SERVER['PHP_SELF'].$url; } ja es izdaru šādi url('?action=kautkas&kautkascits="'.$row['category_id'].'"'); tad tā atgriež ....?action=kautkas&kautkascits= Kāpēc tā un ko varētu darīt lietas labā? Edited July 26, 2007 by Jackal Link to comment Share on other sites More sharing options...
bubu Posted July 26, 2007 Report Share Posted July 26, 2007 Pēc kā tu spried, ka tā atgriež tikai to? Link to comment Share on other sites More sharing options...
Jackal Posted July 26, 2007 Author Report Share Posted July 26, 2007 (edited) Laikam nepamaniji daudzpunkti priekšā. Tātad pilnais links kuru atgriež funkcija http://localhost/index.php?action=kautkas&kautkascits= bet $row['category_id'] kaut kur ir pazudis. Edited July 26, 2007 by Jackal Link to comment Share on other sites More sharing options...
Toms Posted July 26, 2007 Report Share Posted July 26, 2007 Tad Tev tas $row['category_id'], ko padod, arī ir tukšs. Link to comment Share on other sites More sharing options...
Jackal Posted July 26, 2007 Author Report Share Posted July 26, 2007 Tur jau tā lieta, ka nav tukšs. Link to comment Share on other sites More sharing options...
Toms Posted July 26, 2007 Report Share Posted July 26, 2007 Kā zini? Neticu. Link to comment Share on other sites More sharing options...
Jackal Posted July 26, 2007 Author Report Share Posted July 26, 2007 (edited) Es to $row['category_id'] pēc funkcijas izsaukšanas izvadu un viss parādās Edited July 26, 2007 by Jackal Link to comment Share on other sites More sharing options...
Toms Posted July 26, 2007 Report Share Posted July 26, 2007 <?php error_reporting(E_ALL); function url($url){ return $_SERVER['PHP_SELF'].$url; } $arr = array(0 => 'xxx'); $testam = '?action=kautkas&kautkascits="'.$arr[0].'"'; echo $testam.'<br/>'; echo url($testam); ?> Izvadītais rezultāts: ?action=kautkas&kautkascits="xxx" /index.php?action=kautkas&kautkascits="xxx" Link to comment Share on other sites More sharing options...
cucumber Posted July 26, 2007 Report Share Posted July 26, 2007 Jega likt GET mainigo vel ieksh "" /index.php?action=kautkas&kautkascits="xxx"? Link to comment Share on other sites More sharing options...
Jackal Posted July 26, 2007 Author Report Share Posted July 26, 2007 (edited) Mans skripts function url($url){ return $_SERVER['PHP_SELF'].$url; } echo '<table border="1">'; $row = array(0 => '3'); $url = url('?action=section&category="'.$row[0].'"'); echo $url; //šeit viss parādās pareizi echo '<tr><td><a href="'.$url.'">'.$row[0].'</a></td></tr>'; echo '</table>'; Jā tomēr funkcijā nav vaina, bet kas varētu būt par problēmu, ka linkā neparādās ?action=section&category=3 bet parādās ?action=section&category= Problēmu atrisināju. bija padaudz pēdiņas saliktas šajā rindā $url = url('?action=section&category='.$row[0].''); Edited July 26, 2007 by Jackal Link to comment Share on other sites More sharing options...
cucumber Posted July 26, 2007 Report Share Posted July 26, 2007 Man gan labak patik shads pieraksts: $url = url("?action=section&category={$row[0]}"); Link to comment Share on other sites More sharing options...
Toms Posted July 26, 2007 Report Share Posted July 26, 2007 $url = url('?action=section&category='.$row[0]); Šis labāks un pārskatāmāks. Link to comment Share on other sites More sharing options...
Val Posted July 26, 2007 Report Share Posted July 26, 2007 $url = url('?action=section&category='.$row[0]); Link to comment Share on other sites More sharing options...
bubu Posted July 26, 2007 Report Share Posted July 26, 2007 Laikam nepamaniji daudzpunkti priekšā. Ļoti labi to pamanīju. To pēc kā tu to spried prasīju tāpēc, lai tu pats pamēģinātu izvadīt ar echo mainīgo, kuram piešķir url funkcijas rezultātu. Tad visu redzētu - vai tā funkcija strādā, vai nē. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted July 26, 2007 Report Share Posted July 26, 2007 (edited) Jackal --> KAPEC LIEC LINKUS PUBLISKAA FORUMA KAS NEKUR NEVED? $%^&*()__ JASAK SADI POSTOTAAJI BUUS LIKT IGNORLISTAA ---------------------- edit: Laikam jaludz moderators peec sadiem gajieniem parvietot topiku uz drazu.... Edited July 26, 2007 by Grey_Wolf Link to comment Share on other sites More sharing options...
Recommended Posts