title: Concatenating PHP session in a single quoted string
body: <p>I have to create an output file (with the compilation errors) into a file.
  My initial approach was this:</p>
  
  <pre><code>$output = system("C:\cygwin\bin\bash.exe --login -c '/cygdrive/c/cygwin/bin/g++.exe /cygdrive/c/Server/www/Codice/chorva.cpp -o /cygdrive/c/Server/www/Codice/chorva.exe &gt;&gt; compile.log 2&gt;&amp;1'");
  </code></pre>
  
  <p>And this code worked.</p>
  
  <p>But when I added sessions, I can't get it to right. What am i doing wrong?
  All help is much appreciated!</p>
  
  <pre><code>$command = "/cygdrive/c/cygwin/bin/g++.exe /cygdrive/c/Server/www/Codice/LOGS/".$_SESSION['username']."/chorva.cpp -o /cygdrive/c/Server/www/Codice/LOGS/".$_SESSION['username']."/chorva.exe &gt;&gt; compile.log 2&gt;&amp;1";    
  $output = system('C:\cygwin\bin\bash.exe --login -c'.$command);
  </code></pre>
  
  <p>EDIT: I did use <code>session_start()</code> and the session username does have a value</p>