Maison  >  Article  >  développement back-end  >  PHP辅攻_[学习资料收集]PHP连接SQLServer2005方法_PHP教程

PHP辅攻_[学习资料收集]PHP连接SQLServer2005方法_PHP教程

WBOY
WBOYoriginal
2016-07-13 17:17:16732parcourir

1.

php.in将mssql.secure_connection = Off改为mssql.secure_connection = On。

连接2005的 ntwdblib.dll (2000.80.194.0)

X:\AppServ\php5\ext ,

 

服务

 

<?<span php
 </span><span $conn</span>=mssql_connect('59.173.xxxxxx.xxxxxx,1468','sa','xxxxxx'<span ); 
   mssql_select_db(</span>'HR',<span $conn</span><span ); 
 
 </span><span $Query</span>="select * from Class"<span ; 
 </span><span $Result</span>=mssql_query(<span $Query</span><span ); 

 </span><span $Number</span>=mssql_num_rows(<span $Result</span><span ); 
 </span><span for</span>(<span $i</span>=0;<span $i</span><<span $Number</span>;<span $i</span>++<span ) 
   { 
 </span><span $Row</span>=mssql_fetch_array(<span $Result</span><span ); 
 </span><span echo</span>(<span $Row</span>[1<span ]); 
 </span><span echo</span>("<br/>"<span ); 
   }   
</span>?>

 

 

来源:http://blog.csdn.net/gumanren/article/details/4673674

 

 

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/626592.htmlTechArticle1. php.in将mssql.secure_connection = Off改为mssql.secure_connection = On。 连接2005的 ntwdblib.dll (2000.80.194.0) X:\AppServ\php5\ext, 服务 ? =mssql_connect('59.173.xxx...
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn