V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  chaegumi  ›  全部回复第 12 页 / 共 13 页
回复总数  246
1 ... 4  5  6  7  8  9  10  11  12  13  
xshell 上边有个 xftp 按钮,直接上
2015-11-18 16:19:19 +08:00
回复了 Liang 创建的主题 PHP php 为何无法自定义 http code? 404 返回 200。
codeigniter 的做法

function set_status_header($code = 200, $text = '')
{
if (is_cli())
{
return;
}

if (empty($code) OR ! is_numeric($code))
{
show_error('Status codes must be numeric', 500);
}

if (empty($text))
{
is_int($code) OR $code = (int) $code;
$stati = array(
100 => 'Continue',
101 => 'Switching Protocols',

200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',

300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
307 => 'Temporary Redirect',

400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Requested Range Not Satisfiable',
417 => 'Expectation Failed',
422 => 'Unprocessable Entity',

500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported'
);

if (isset($stati[$code]))
{
$text = $stati[$code];
}
else
{
show_error('No status text available. Please check your status code number or supply your own message text.', 500);
}
}

if (strpos(PHP_SAPI, 'cgi') === 0)
{
header('Status: '.$code.' '.$text, TRUE);
}
else
{
$server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
header($server_protocol.' '.$code.' '.$text, TRUE, $code);
}
}
2015-10-11 07:08:59 +08:00
回复了 fzinfz 创建的主题 PHP PHP 貌似还不支持命名参数?好奇 PHPer 们真的不关心这个特性吗?
@zhengkai +10086
2015-09-18 12:42:58 +08:00
回复了 dieaz5 创建的主题 问与答 想给爸买个手机,望给点意见
买 iphone6 不会错的
2015-09-18 08:26:59 +08:00
回复了 niselover 创建的主题 iDev 被 app store 拒了 大家看看这怎么办?
好像是不能主打这个功能,只能作为一个附加功能
ckeditor + ckfinder + 1
2015-09-11 16:34:06 +08:00
回复了 ilancelot 创建的主题 V2EX 有关“通过电子邮件重设密码”这一页面的小问题
用户名或者注册邮箱选填比较科学吧,事关用户体验,没什么绑架的
2015-09-10 08:16:22 +08:00
回复了 zyllwy 创建的主题 iPhone 发布会从来不提运存,等拆解吧,希望是 2G
6s 是 1G,6s plus 是 2G
2015-09-09 08:50:06 +08:00
回复了 tanteng 创建的主题 PHP 有没有通用的 RBAC 后台管理系统?
2015-09-01 17:33:50 +08:00
回复了 crs0910 创建的主题 职场话题 面试需要带简历吗?
去面试时不是会让你现填一个吗?然后你带过去的,他两个会一起看
@dorentus
@ericdiao
@Phariel
死在空格上了,我刚开始也是直接想到了 json_decode ,但是没解出来。
2015-08-28 14:49:06 +08:00
回复了 xspoco 创建的主题 问与答 怎么截图一个超长的网页?
红蜻蜓
2015-08-27 17:42:48 +08:00
回复了 sjtlqy 创建的主题 然而并没有 挂了! O(∩_∩)O~ !!! 阿里云镜像挂了!
正常的

date
@abelyao wecenter
帮朋友做个广告 http://www.80page.com/
2015-08-21 15:25:22 +08:00
回复了 administrator001 创建的主题 问与答 求推荐好点的笔记本!
分辨率绝对要高的,不要买 1366x768
2015-08-20 13:44:53 +08:00
回复了 lbp0200 创建的主题 PHP 为什么 nginx 负载均衡多台 php-fpm,并发数和单机差不多
很大很大的量时才能看出区别吧
2015-08-19 09:18:56 +08:00
回复了 jasonsama 创建的主题 PHP 请教一个 CI 框架的问题
这个跟框架无关,你用 curl ,等于是用一个新的浏览器,跟你本来登录的那个浏览器不一样,当然 session 没了
2015-08-19 09:16:04 +08:00
回复了 coderstudy 创建的主题 PHP 看完 PHP 的基础,推荐一个新手 PHP 框架
codeigniter
1 ... 4  5  6  7  8  9  10  11  12  13  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5421 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 42ms · UTC 01:53 · PVG 09:53 · LAX 18:53 · JFK 21:53
Developed with CodeLauncher
♥ Do have faith in what you're doing.