Python 提供了两个基本的 socket 模块:
Socket它提供了标准的BSD Socket API。SocketServer它提供了服务器重心,可以简化网络服务器的开发。
下面讲解下 Socket模块功能。
| <?php | |
| class PostController extends Controller | |
| { | |
| // ... | |
| public function actionDelete($id) | |
| { | |
| $this->findModel($id)->delete(); | |
| if (!Yii::$app->request->isAjax) { | |
| return $this->redirect(['index']); |