|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-02 08:59 UTC] sas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 03:00:01 2025 UTC |
I have a script using sessions and returning to the browser some javascript code. The first time I run the script (throug the browser or even in a command shell) I get some additional '"' characters into <script> tag and javascript goes in error. After the first run (i.e. the session already exists) everithing is OK. i.e. using the script: --------------------------------------- <? session_start(); ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } ............ ----------------------------------------- I get the following response: ----------------------------------------- <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x="a[i])&&x.oSrc;i++)" x.src="x.oSrc; " } ...... ----------------------------------------- The problem affects PHP4pl1 in Windows NT 4.0 with both IIS4 and Apache. Moving the script into Linux enviroment everithing goes OK!