String replace all:

var str="<>";
str=str.replace(/\'/g,"’");//替换半角单引号为全角单引号
str=str.replace(/\"/g,"”");//替换半角双引号为全角双引号
str=str.replace(/</g,"《").replace(/>/g,"》");

POST with AnglarJS $http

Default conten-type is:

application/json;charset=UTF-8

Need to change it and the data you sent with it:

How can I make angular.js post data as form data instead of a request payload?

.htaccess

  1. .htaccess Tutorial
  2. .htaccess Guide

Remove index.php in the URL for Codeigniter:

Options -Indexes

<IfModule mod_rewrite.c>

    RewriteEngine on
    RewriteBase /selfcontrol/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d 

    #Uncomment one of the following rewrite rules. 
    #Some servers require the ? after index.php, some don't

    #RewriteRule ^(.*)$ index.php?/$1 [NC,L,QSA]
    RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php
</IfModule>

ASCII and Binary

  1. FTP在传送文件时分为ASC和Bin两种格式,只有文字文件(例如 html 文件)使用ASC,其他的通通使用Bin格式(例如图像文件、压缩文件、可执行文件等等)。
  2. 当我们使用ftp时,可简单地把文件分为两种基本类型:文本文件和二进制文件;文本文件也称为ASCII文件,其文件内容遵循ASCII的定义,其主要特征是文件内容由若干行组成,可以使用操作系统的显示、编辑命令来显示和编辑ASCII文件的内容,它使用的传输模式是asc;二进制文件(Binary File)是指除ASCII文件以外的所有文件格式,它使用的传输模式是bin;需要注意的是,可以将ASCII文件按二进制模式传输,但决不能将二进制文件按ASCII模式传输,否则二进制文件的内容会遭到破坏而无法使用。
  3. ASCII 切换传输模式为文字模式(只能用来传送文字文件); BINARY 切换传输模式为二进制模式(除文字文件外皆用此模式);
  4. 文字文件传输推荐ASC而程序或数据文件必须使用BIN。

From: FTP中传输模式:BIN与ASC的差别

.htaccess要用ASCII传。