Home > Backend Development > PHP Tutorial > Technical problems encountered in entrepreneurship in 2015: 91-100

Technical problems encountered in entrepreneurship in 2015: 91-100

WBOY
Release: 2016-08-08 09:25:46
Original
902 people have browsed it
91.PHP logging method. error_log("error info");92.weiphp Turing robot bug needs to be modified in 3 places. Problem description: After enabling the chat plug-in, I found that no matter what content was entered on the WeChat client, the reply was preset content, and the Turing robot function could not be used. Problem analysis: After checking the source code, I found a bug in the AddonsChatModelWeixinAddonModel.class.php file. In function _tuling($keyword), there is a place to judge the Turing return value: [mw_shl_code=php,true] if ($result ['code'] > 40000) {if ($result ['code'] < 40008 && ! empty ( $result ['text'] ) ) {$this->replyText ( 'Turing robot please pay attention:' . $result ['text'] );} else {return false;} }In addition, there are two identical cases '200000' : code in the following code, one can be deleted. " After completing the above modifications, text chat can be carried out normally on WeChat. However, if you enter news, WeChat will still report an error., v+ v: _9 q# O1 nAfter several tests, I found that it is When replying to graphic messages, there is no limit to the total number of graphic messages.The number of pictures and texts allowed by WeChat at one time seems to be 10, but the number of news items returned by Turing was 20, which was misjudged by WeChat. Because there are many places to generate images and texts, I fixed them uniformly in the file ApplicationHomeModelWeixinModel.class.php: public function replyNews($articles) {if ( count ( $articles ) > 10) {array_splice($articles, 10); // Discard content after 10 items to avoid WeChat errors}$msg ['ArticleCount'] = count ( $articles ); $msg ['Articles'] = $articles;$this->_replyData ( $msg, 'news' );}Reference: http: //bbs.weiphp.cn/thread-1976-1-1.html93. There are 3 ways of Turing robot API.a. Access API: Api address: http://www.tuling123.com/openapi/apiRequest method: http getData format: jsonb. Enter the WeChat public platform: http://www.tuling123.com/openapi/wechatapi?key= 306839dbd81e291718429191767c2070 c.QQ Robot: Download Turing Robot Kit Reference: http:// tuling123.com/openapi/cloud/access_api.jspIn the weiphp platform, the original example used the "access API" method, "/openapi/api",Later, because of setting your own key , changed the address to "/openapi/wechatapi", because I thought we were a WeChat public platform, but it got stuck for a long time. Correct answer: Although it is a WeChat public platform, the backend specifically calls the Turing Robot API through the PHP interface, so the first method should be used. 94. How to put chrome developer tools below.I don’t know what happened. The console floated to the right. After switching modes, it was displayed directly in a new window. It was very strange. Solution: Long press the button on the picture (Dock to main window). If it fails, try a few more times. There is such an extremely hidden skill, damn it. 95.weiphp micro-investigation bug.References: [Module BUG] Micro-survey and other forms do not display the name and mobile phone number filled in by the user6th and 16th floors/* $member = get_memberinfo ( $vo ['uid'] );                                                                                                                                                 $vo ['truename'] = $member ['truename' ];                                  $vo ['mobile'] = $member ['mobile']; ( $member )) {                                                                                                                                              AddonsSurveyControllerAnswerController.class.phpPlace 1: $member = get_followinfo ( $vo ['uid'] );Use this method to get $member. Point 2: $vo ['truename'] = $member ['nickname'];96. Frequent plugging and unplugging of the mouse may cause problems. Log off or restart the Windows system, it will probably be fine. I have encountered it several times. 97. The WeChat menu is not refreshed. a. Unfollow and follow again. b. Wait, sometimes, no matter how you make the menu, it doesn’t refresh in time. All we can do is wait patiently. Using the WeChat debugging tool to obtain the WeChat menu, I found that the menu has been modified successfully. However, the menu obtained by following the WeChat official account is not the latest. Depressed. 98. There is a problem with Apache copying the directory.import org.apache.commons.io.FileUtils;Apache's copyDirectoryToDirectory(src,to);"C://js", "C://js2/", put js in this directory Copy it to js2 and it becomes C://js2/js.import jodd.io.FileUtil;Jodd's method and aspectj's method of copying files are what is needed. Copy all the files in the js directory to js2. Instead of having a directory called js under js2. 99.md5 password cracking. I found a php system from the Internet. After installing it, the password was wrong. It was not the password set during the installation process. According to the password 2cb7eba0f22a74e42ff016dfb55cf5a0 in the database table, I went to the Internet to crack it and found that the password was like1989. The open source code on the Internet may have been modified by others. It is not certain whether there is a backdoor. 100.wamp originally has xdebug built-in. Run a php program and found that redundant xdebug information was returned in the ajax request.Accidentally, I found that waml has built-in xdebug, which is quite good. It’s just that the ajax request should not output an error message. The error is like this. The mysql_connect function is no longer recommended in php5.5, and xdebug keeps outputting error messages. Just use the function of mysql_li instead. Wuhan Jiutianniao-Wuhan's leading mobile Internet system developer Jiutianniao Q&A-http://ask.jiutianniao.com Jiutianniao Blog-http://blog.jiutianniao.com Jiutianniao official website-under construction, please stay tuned

The above introduces the technical problems encountered in entrepreneurship in 2015: 91-100, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template