-------------------------------------------------------------------
服务端: 接收文件 #./file-server.py
#!/usr/bin/python
import SocketServer
# Format: name_len --- one byte
# name --- name_len bytes
# data --- variable length
# Save data to name into current directory
addr = ('192.168.230.128', 1234)
class MyTCPHandler (...
war包的打包与解包
需安装yum install java-1.7.0-openjdk-devel
把当前目录下的所有文件打包成game.war
jar -cvfM0 hello.war ./
-c 创建war包
-v 显示过程信息
-f
-M
-0 这个是阿拉伯数字,只打包不压缩的意思
解压hello.war
jar -xvf hello.war
解压到当前目录
hello.war 是一个测试用的简易war包,再搭建tomcat时可以方便进行测试,下载地址:http://s.zhusl.com/Apache/hello.war...
php5.6 CI的问题(Only variable references should be returned by reference)
A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257
原代码:
return $_config[0] =& $config;
修改后:
$_config[0] =& $config;
return $_config[0];...
Starting MySQL.Manager of pid-file quit without updating fi
出现这个问题,主要是,因为本服务器原来已经安装过mysql 没有卸载干净,所以会报错.
第一,先删除rm -rf /var/lib/mysql,然后重新初始化
usr/local/mysql/bin/mysql_install_db --user=mysql
第二, 看是否已经运行数据库进程了,ps -a|grep mysql
[root@c5 mysql-5.1.48]# service mysqld start
Starting MySQL.Manager of pid-file quit without updating file. [失败]
[root@c5 mysql-5.1.48]# ps -a|grep mysql
2618 ? 00:00:00 mysqld_safe
2668 ? 00:00:00 mysqld
[...
WordPress程序根目录
WordPress程序根目录
1.index.php:wordpress核心索引文件,即博客输出文件。
2.license.txt:WordPress GPL许可证文件。
3.my-hacks.php:定义了博客输出之前处理的追加程序。默认安装中并没有这个文件,但如果存在,它就会被管理页面引用。
4.readme.html:WordPress安装导言。
5.wp-atom.php:输出Atom信息聚合内容。
⒍wp-blog-header.php:根据博客参数定义博客页面显示内容。
7.wp-cron.php
8.wp-comments-post.php:接收评论,并把其添加到数据库。
9.wp-comm...
date_default_timezone_set()
在写php程序中有时会出现这样的警告:
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\PHPW...
make: *** [sapi/cli/php] 错误 1
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/home/king/php-5.2.13/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@test php-5.2.13]# vi Makefile
在安裝 PHP 到系统中时要是发生「undefined reference to libiconv_open'」之类的错误信息,那表示在「./configure 」沒抓好一些环境变数值。错误发生点在建立「-o sapi/cli/...
Apache下PHP Loaded Configuration File None 解决方法
phpapachePHP Loaded Configuration File
PHP Loaded Configuration File None
phpinfo()输出 loaded configuration file none,
解决方法可在apache配置文件中增加
PHPIniDir “The path to your php.ini”,
比如:PHPIniDir "/usr/local/php/etc/php.ini"
重启apache。
确保PHPIniDir在loadModule php5_module之前...