Jump to content
php.lv forumi

SESSION dati izmainās


reiniger

Recommended Posts

Sveiki

 

Man kaut kā nesaprotama lieta sanākusi. Postoju šeit, jo manliekas ka php problēma nevis jquery.

 

Izsauc formu un nosūta ar Jquery uz saglabāšanas lapu sessiju.

Pamata lapa nodefineju mainigo;

$_SESSION['url_big_msg'] = $_SERVER['SCRIPT_URL'];

Ar Jquery post uz save php

$.post("r/sistem_msg.php",{nameT: name.val()});

 

Un šajā sistem_msg.php man $_SESSION['url_big_msg'] vērtība izmainās.

 

Piemērs

// ka piemers $_SERVER['SCRIPT_URL']
$_SESSION['url_big_msg'] = 'lv/test/gals';

// bet sistem_msg.php faila parādās kā
$_SESSION['url_big_msg'] = 'lv/test/favicon.ico';

 

Ja es nomainu $_SESSION['test2'] sesijas nosaukumu, tad pirmo reizi nostrādā pareizi, bet izpildot sutīšanu atkārtoti atkal pievienojas favicon.ico!

 

Kas varētu būt pa problēmu kādēļ sesijas dati izmainās? Vai .htaccess varētu kaut ko muļķoties? Vai arī mans nogurums...

Link to comment
Share on other sites

.htaccess

php_value default_charset utf-8
RewriteEngine on

rewritecond %{http_host} ^domens.lv [nc]
rewriterule ^(.*)$ http://www.domens.lv/$1 [r=301,nc] 

RewriteRule ^lv/([^/]+)/([^/]+)/([^/]+) index.php?patch=lv/$1/$2/$3
RewriteRule ^lv/([^/]+)/([^/]+) index.php?patch=lv/$1/$2
RewriteRule ^lv/([^/]+) index.php?patch=lv/$1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...