分类目录归档:编程

.net 2.0与1.1应用冲突 Server Application Unavailable

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the “Refresh” button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

继续阅读

25个PHP游戏编程脚本代码/zz/

简单的掷骰器
许多游戏和游戏系统都需要骰子。让我们先从简单的部分入手:掷一个六面骰子。实际上,滚动一个六面骰子就是从 1 到 6 之间选择一个随机数字。在 PHP 中,这十分简单:echo rand(1,6);。
在许多情况下,这基本上很简单。但是在处理机率游戏时,我们需要一些更好的实现。PHP 提供了更好的随机数字生成器:mt_rand()。在不深入研究两者差别的情况下,可以认为 mt_rand 是一个更快、更好的随机数字生成器:echo mt_rand(1,6);。如果把该随机数字生成器放入函数中,则效果会更好。

继续阅读

php curl的使用

在PHP开发中,有时候需要在内 部网中进行开发。对于数据收集项目,有时候服务器需要连接Internet网络来获取Internet网络上的信息。但是,如果公司是通过防火墙上网,一 般的file_get_post_content函数就不行了。当然,通过一些socket操作,直接向proxy写http请求也是可以的,但是比较麻烦。本文讨 论用CURL库的简单代理实现。

继续阅读