Friday, August 24, 2012

CSS, JS, and Images are not accessible in Window Server 2008

It need to add Static Content server in the IIS. At window server 2008, need to right click on Web Server IIS > Add Role Services > tick on Static Contents and finish the installation. And then restart the IIS.

credited to : Henk De Groot  from 

http://www.dailycomputersolutions.com/blog/index.php/2010/04/23/iis-not-showing-images-and-css/


Henk De GrootCollapse
Wow man, many thanks....a real life saver.
To do this in windows 2008 R2, you need to go to the Server Manager.
Then select Add Role Services.
Now find the "Static Content" feature under the Webserver->Commen HTTP Features.
Enable this and complete the wizard.
Work for me and I can get some sleep now.

Wednesday, August 15, 2012

Saving \x text from Power Point to Excel into MySQL

FROM http://php.net/manual/en/function.iconv.php

berserk220 at mail dot ru 29-Feb-2008 06:44
So, as iconv() does not always work correctly, in most cases, much easier to use htmlentities(). 
Example: =htmlentities(file_get_contents("incoming.txt"), ENT_QUOTES"Windows-1252");  file_put_contents("outbound.txt"html_entity_decode($content,ENT_QUOTES "utf-8")); ?>

Monday, August 6, 2012

Downloading CSV over https

header("Pragma: public");
  header("Expires: 0");
  header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  header("Cache-Control: private",false);
  header("Content-Type: application/octet-stream");
  header("Content-Disposition: attachment; filename=\"$filename\";" );
  header("Content-Transfer-Encoding: binary");
    print $out;

http://stackoverflow.com/questions/2232103/how-do-i-get-csv-file-to-download-on-ie-works-on-firefox