跳至正文

How To : Improve Your PHP Programming 如何提高你的PHP编写水平

中文版 转自 落伍

Hello everyone,

I’ve decided that I would make a thread here describing the different things that I do to improve other people’s PHP scripts.

Hope you enjoy it and learn a thing or two.

1 – Your PHP Tags
I know some of you prefer to use the short tags when writing PHP scripts but this is not always the best way of doing it.
The standard tags are much better as they will work on every server that you write your PHP code on. You may move to a server some day that doesn’t allow the short tags or the ASP-style tags and you will have to sit for an hour and update your PHP scripts.

2 – Debugging Your PHP Code
Some of us may run into a problem when programming a PHP script and don’t know what’s wrong with it. The error_reporting() function in PHP helps you out by telling every error you have on your page. To show all of the errors on the page that you’re editing, put this on the second line :

CODE: [Copy to clipboard]
PHP:
How To : Improve Your PHP Programming 如何提高你的PHP编写水平

域名抢注入门

域名抢注就是一个域名在被别人注册之前,抢先将此域名以注册人的名义注册下来的行为。
好的国际域名基本上已经被欧美等发达国家瓜分完毕。
现在要得到一个好的国际域名,要么高价购买。要么抢注。
每天都有大量的过期未续费的域名被踢出,这里边不乏许多的好域名。
只要你比别人抢先一步,以自己的名义注册下来,那么它就是你的了。(当然你要记得续费,要不到期后

同样会被踢出,很多好域名就是这样被踢出来的哦)
那么,如何才能比别人抢先一步,抢注自己喜欢的域名呢?域名抢注入门