Cinis Posted February 11, 2014 Report Share Posted February 11, 2014 .htaccess saturs: RewriteEngine on RewriteRule ^([^/\.]+)/?$ ?action=$1 [L] RewriteRule ^([^/\.]+)/([^/\.]+)/?$ ?action=$1&job=$2 [L] jacascript saturs: $('.delete').live("click",function() { var ID = $(this).attr("id"); var dataString = 'user_id=' + ID; $.ajax({ type: "POST", url: "include/delete.php", data: dataString, cache: false, success: function(html) {alert(html);} }); }); links kurā atrodos: http://127.0.0.1/list/users Lieta tāda, kad ir 1.links, tad nestrādā, bet kad 2.links tad viss strādā un ir pa smuko. Kur jāmeklē problēma? jo url: "include/delete.php", pieliku priekšā "/" arī tas nestrādā ;( jau iepriekš paldies Quote Link to comment Share on other sites More sharing options...
rpr Posted February 12, 2014 Report Share Posted February 12, 2014 Pirmkārt nevar saprast, kas tev vispār nestrāda. Nodefinē konkrēti problēmu. Paksaties ko rāda logu requestos un uztaisi kaut kādu var_dump pa vidu un salīdzini vai ir vēlamais ar paredzēto. Quote Link to comment Share on other sites More sharing options...
Kemito Posted February 12, 2014 Report Share Posted February 12, 2014 Nebūs Tev ērtāk data vietā dot vienkārši objektu? Kapēc "live", ja labu laiciņu jau deprecated, izmanto http://api.jquery.com/on/ URL Tev ir jānorāda url, nevis fails uz kurieni tiek sūtīts. Jeb Tev routing vispār tur neeksiste? Quote Link to comment Share on other sites More sharing options...
jurchiks Posted February 12, 2014 Report Share Posted February 12, 2014 include vispār nevajadzētu būt pieejamam publiski, tam būtu jābūt noslēptam. Mūsdienās kaut kāda velna pēc ļoti daudz saitu visu kodu samauc publiskajā folderī, kaut gan tur vajadzētu atrasties tikai pāris failiem. Quote Link to comment Share on other sites More sharing options...
Cinis Posted February 14, 2014 Author Report Share Posted February 14, 2014 Pirmkārt nevar saprast, kas tev vispār nestrāda. Nodefinē konkrēti problēmu. nestrādā tas, ka jquery funkcijas viss nostrādā, bet piemēram, lai dati aiziet uz url: failu neaiziet Quote Link to comment Share on other sites More sharing options...
jurchiks Posted February 14, 2014 Report Share Posted February 14, 2014 (edited) http://127.0.0.1/list/users + include/delete.php = http://127.0.0.1/list/include/delete.php Edited February 14, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
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.