Technical problems encountered in entrepreneurship in 2015: 121-130

WBOY
Release: 2016-08-08 09:25:07
Original
983 people have browsed it

121.What is the difference between . and -> in PHP?

$this->, use "->" to call the class method.

".", what does it mean? (Of course, it can represent string connection.)

122.Thinkphp determines whether you are logged in.

{$Think.session.user}

{$Think.session.user}

As we gradually learn PHP in depth, many problems will not be clear until we gain more experience.

First, I logged in and jumped to the article, but it never succeeded.

$this->error("Username or password is incorrect","article");

Can I only use redirect?

123. Thinkphp’s redirect function is garbled in Chinese.

header("Content-type:text/html;charset=utf-8");

Find the redirect function in ThinkPHP/Common/functions.php.

The redirect method in ThinkPHP/Lib/Core/Action.class.php seems to be better.

A function and a method are added with a header statement to specify the encoding.

Reference: http://www.thinkphp.cn/topic/11472.html

124. Yunda has a courier, but the record cannot be found online.

The courier guy said that they can only check it internally.

This happens to some orders, why?

125. Thinkphp’s include tag.

include has many uses, some are "full paths, which need to be suffixed", and some are "relative paths, which do not need suffixes".

For more information, please refer to: http://www.cnblogs.com/bafeiyu/archive/2013/02/20/2918136.html

126. PHP formats dates and obtains array elements.

{$item.ctime}, the date can be displayed normally in Thinkphp: "2015:3:12 11:11:11".

However, I found that in native PHP, the display is not normal.

Later I discovered that when getting elements in PHP, don’t use “.” anymore, just use the standard item["ctime"].

Is there a concept of EL expression in PHP?

127. Found a new Juqery plug-in, jquery.pngfix.js.

Let all browsers support png.

Don’t all browsers support png? I’ve heard that the png format is a “standard” a long time ago.

128. Thinkphp has a weird problem in getting variables.

<script></p> <p> var cid = "{$article['cid']}";</p> <p> var prid = "{$article['prid']}";</p> <p> console.log("cid2:" +cid);</p> <p> console.log("prid2:"+prid);</p> <p> if(cid){</p> <p><span></span> $("#cid").val(cid);</p> <p> }</p> <p> if(prid ){</p> <p><span></span> $("#prid").val(prid);</p> <p> }</p> <p></script>

There is a piece of code "A". Before A, there is the latest value. After A, The data was never right.

What is hair?

Found the reason, redefined the variable below and covered it.

  • {$article ["title"]}
  • How to locate the problem: the old routine, "binary search".

    129. There are too many CSS codes and it’s too confusing.

    It has caused interference, the effect of some styles has been abnormal, and the positioning problem is really troublesome.

    130.AJAX executes asynchronously and can use callbacks.

    The paging statement fupage, after execution, renders the data.

    Then, the "bidding progress" can be processed.

    //Rewrite the over method

    FuPage.prototype.over=function(a,b,c){

    progressbar();

    }

    Use the "callback" method to complete.

    fuPage = new FuPage();

    After paging is completed, the over method will be called.

    Wuhan Jiutianniao - p2p online loan system development - Internet application software development

    Company official website: http://jiutianniao.com
    Social Q&A: http://ask.jiutianniao.com

    The above introduces the technical problems encountered in entrepreneurship in 2015: 121-130, 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