Home > Backend Development > PHP Tutorial > 用了腾讯云服务器遇到两个问题

用了腾讯云服务器遇到两个问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:19:54
Original
1309 people have browsed it

1.文件编码为utf-8,传到服务器上之后,用xshell连接,编码格式已设置也utf-8,用cat命令查看文件中文正常显示,用vim命令打开后中文乱码
2.curl获取access_token总是超时,没有返回结果,curl开启了,测试其他链接没有任何问题,在本地没有问题,同样的代码在阿里云服务器也没有问题?
第一次用腾讯云服务器,不知道大家有么有遇到过?该怎么解决?谢谢

回复内容:

1.文件编码为utf-8,传到服务器上之后,用xshell连接,编码格式已设置也utf-8,用cat命令查看文件中文正常显示,用vim命令打开后中文乱码
2.curl获取access_token总是超时,没有返回结果,curl开启了,测试其他链接没有任何问题,在本地没有问题,同样的代码在阿里云服务器也没有问题?
第一次用腾讯云服务器,不知道大家有么有遇到过?该怎么解决?谢谢

编码问题,应该是vim默认编码的问题试试

set encoding=utf-8  
set termencoding=utf-8  
set fileencoding=utf-8
Copy after login

当然也可能是操作系统的默认语言和编码问题,也可以试试,在/etc/profile中添加

export LANG=en_US.UTF-8
# 或者
export LANG=zh_CN.UTF-8
Copy after login

第二个问题,你既然都说了在阿里云下面没问题,那就不知道了。
PS: 是不是没有改微信公众平台的服务器URL啊

你试试行不行

没人遇到过吗?

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template