(1)解决php.ini文件放置路径问题方法:
在Unix上,php.ini文件缺省放在/usr/local/lib上面,因为缺省的存放路径是<install-path> /lib,但是可以在编译的时候使用--with-config-file-path参数来修改php.ini的存放位置,例如你可以使用--with- config-file-path=/etc把它存放到/etc下面,然后可以从源码包中拷贝php.ini-dist到/etc/php.ini并修改使之满足需要。
(2)window平台上apache/php错误:
(20024)The given path is misformatted or contained invalid characters: Cannot map POST /prorC?%20echo($submit_form_action_path)%20?%3E HTTP/1.1 to file, referer: http://...../index.php?a=platform_user
从上次更新了php 5.3之后,这个问题困扰了我好几天。在网上查资料,基本上都是无果而终。今天运气好点,将同样配置的机器(window xp sp3/apache 2.2.17/php 5.3.35)升级到了5.3后,发现这个机器可以正常运行。开始怀疑是apache的问题,就用winmerge比较两台机器的httpd.conf文件,发现文件内容都是一模一样的,除了端口不同。自己怀疑真的是否遇到了所谓的“人品问题”,心里不干,又比较了一下php.ini文件,最后发现两个文件在第226行中有一个
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
最后将这里改成
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = On
问题解决,自己php的业余爱好者,遇到这样的问题只能是抓虾了,希望对还在抓虾的童鞋有所帮助。最后鄙视下win下 的php
。推荐大家还是在linux下折腾吧
。
(2)EOT定界符使用中出现的错误:
PHP Parse error: syntax error, unexpected T_SL in
Parse error: syntax error, unexpected $end in
echo <<< EOT
<table width=80% border="2" cellpadding="3" cellspacing="0" bordercolor="#808080">
<tr bgcolor="#84A9E1">
<td align="center">ClassID</td>
<td align="center">stuno</td>
<td align="center">学生姓名</td>
<td align="center">家长姓名</td>
<td align="center">家长手机号</td>
</tr>
EOT;
开始的"<<<EOT"定界符后面不能有tab或空格,可以加回车。
结束的"EOT;"必须要顶在这一行的最前面。中间不能用空格或tab等字符。(php有一个折磨人的问题。)
(3)php.ini中date.timezone的设置
php5的时区设置默认为UTC,为了将其改成北京时间,可以将其设置为
date.timezone =Asia/Chongqing
或者
date.timezone =Asia/Shanghai
(4)php日志输出在windows cmd中是乱码,解决办法修改cmd编码方式:
由于在telnet到服务器的时候,某些服务器是utf-8编码的,但是Windows cmd默认的是系统编码,所以需要修改下,使用chcp 命令:
Java代码 收藏代码
1. chcp 65001 就是换成UTF-8代码页
2. chcp 936 可以换回默认的GBK
3. chcp 437 是美国英语
分享到:
相关推荐
It has become widely popular because of its support for custom extensions and module development. This book helps you understand how to use the features available in OpenCart using step-by-step ...
Along the way, you’ll pick up lots of useful development tips. It contains: How to Create a Reddit Clone Using React and Firebase by Nirmalya Ghosh Build a CRUD App Using React, Redux and ...
Along the way, you’ll pick up lots of useful development tips. It contains: How to Create a Reddit Clone Using React and Firebase by Nirmalya Ghosh Build a CRUD App Using React, Redux and ...
Marco takes you through the workings of the example step by step, and then presents some expert's tips, which will take your understanding further, and give you unique insights into Flex development....
Database\Oracle Internals - Tips Tricks and Techniques for DBAs.mobi Database\OReilly High Performance MySQL.mobi Database\OReilly SQL and Relational Theory 2nd.mobi Database\OReilly SQL Cookbook.mobi...
Because every second—every kilobyte—matters Performance simply matters. Technology may allow us to “go ... You’ll need to be familiar with server-side development in order to follow the discussion.
- Tips for continuing development and staying updated with Flask and related technologies. #### Style and Approach The book adopts a practical, hands-on approach, providing comprehensive ...
I’ve also included new and improved tutorials, tricks and tips to make you a better and more effective designer, and an entirely new chapter focus- ing on the new SuperPreview application included ...
This power tip provides an explanation as well as some tips to get the most out of temp files. Backup and Restore Settings One of the staples of UltraEdit (and UEStudio) is its highly configurable ...
9.3.1 Monitoring and Fixing Errors ...............................350 9.3.2 Alex King’s 404 Notifier Plugin .....................................................351 9.3.3 Broken Link Checker Plugin ....