How to display arabic characters in web page using php and sql server

后端 未结 3 1084
情歌与酒
情歌与酒 2021-01-25 09:27

How can I display Arabic characters in web page using php and sql server? The Arabic data is stored in the database (sql server). Now I want to use php to display that data on t

3条回答
  •  耶瑟儿~
    2021-01-25 09:47

    The official solution for Unicode in mssql with php

    $serverName = "MyServer";
    $connectionInfo = array( "Database"=>"AdventureWorks", "CharacterSet" => "UTF-8");
    $conn = sqlsrv_connect( $serverName, $connectionInfo);
    

    use this in your connection code,
    get more support on utf 8 issue on
    http://msdn.microsoft.com/en-us/library/cc626307.aspx

提交回复
热议问题