Previous issue resolution records and issue resolution records

Source: Internet
Author: User

Previous issue resolution records and issue resolution records

------------------------- Html/css ----------------------------------

The QR code at the bottom of the web page is visible, and the text block on the right disappears. It turns out to be a width problem. Modify the width and the two divs will be 49%.

Similar to the li at the bottom of Baidu or Baidu, it will appear. Use list-style: none; global processing and put it in the body for global effect.
Use style = "list-style-type: none", not very useful
The li in the tag can be valid, and the li in the p tag is invalid. It is better to use the global one.

------------------------- FTP-related WinSCP -------------------------------

I found a problem. When I modified the ftp, the code was okay and it was always unsuccessful. Later I found that it was a delay. I changed the code and ftp was not updated, so it was always unsuccessful. It seems that, A waste of time. Be sure to check the modification time in ftp before testing.

-------------------------- Development ----------------------------------

Development, graphic reply, put the public code in the controller into the new model file, create a method in the new model, and put the public code in the method.
The definition in the instantiation model file in the Controller varies according to the thinkphp version. The video contains version 3.1 and I am 3.2.3. I have not done it in the manual. The model definition in the manual must inherit the model, this is the case of operating tables. I didn't use databases or tables here, and finally removed the inheritance successfully.
Model Code
Namespace Imooc \ Model;
Use Think \ Model;
Class IndexModel
{// Reply to messages of multiple image and text types
Public function responseNews ($ postObj, $ arr)
{

Controller code
Namespace Imooc \ Controller;
Use Think \ Controller;
Class IndexController extends Controller
{
// Instantiate the Model
$ IndexModel = new \ Imooc \ Model \ IndexModel ();
$ IndexModel-> responseNews ($ postObj, $ arr );

--------------------------- VM ---------------------------------------

The project on the virtual host is not successfully accessed at http://www.long.com/imooc.php/index/http_curl.
Http://www.long.com/imooc.php only
This is because the default access mode is normal // www.huqunlong.com/imooc.php&c=Index&a=http_curl.
Find the thinkphp configuration file convent. php to change the mode, and then find that you can set pathinfo directly on the VM Control Panel page.
Http://www.long.com/imooc.php/Index/http_curl accessed successfully

--------------------------- Memcached-related -------------------------------

Error failed to install service or service already installed when memcached is installed in cmd of Shenzhou Ares Z7M windows 10

Solution:

1. Find the cmd.exe file (c: \ windows \ system32 \ cmd.exe)

2. Right-click cmd.exe and run it as an administrator.

Install memcache in windows
1. Download memcache's windows stable version from Baidu and decompress it to a disk, for example, in c: \ memcached
2. Enter 'C: \ memcached \ memcached.exe-d install' on the cmd command interface to install
3. Enter 'C: \ memcached \ memcached.exe-d start' to start
Right-click/manage/service/check that the memcached service has been successfully started and installed.

Note: in the future, memcached will be used as a windows Service and will be automatically started every time it is started. Default port: 11211.
If you want to uninstall it, run the following command:
1.memcached.exe-d stop
2.memcached.exe-d uninstall

Install memcache on disk D
To use memcache, copy the files in memcache to the project files under WWW.

--------------------------- Mysql-related --------------------------------------

PreparedStatement is a pre-processing statement, which can improve the execution efficiency of the database. PreparedStatement can prevent SQL injection.

Column 'id' in where clause is ambiguous
The column 'id' in the where clause is ambiguous and does not specify the table id of this id. Multiple tables have id fields.

Echo $ product-> getLastSql (); get the SQL statement that was last executed to print the wrong SQL statement and put it under the DOS command for execution. Then you can know where the SQL statement is wrong and change the SQL statement according to the error.

1052: Column 'state' in where clause is ambiguous
The two tables have the same field state.

Doscommand Line Error in Windows 10: "mysql" is not a command inside or outside the system
Solution: configure the bin directory of mysql to the path environment variable of the system.
Find the MySQL installation directory, which is D: \ phpStudy \ MySQL \ bin.
Right-click computer properties/advanced system settings/environment variables/system environment variables/path environment variables/edit text
Add; D: \ phpStudy \ MySQL \ bin at the end of the variable value

-------------------------- Thinkphp3.2.3 -----------------------------

Add html pages
<Input type = "hidden" value = "{$ Think. server. HTTP_REFERER}" name = "surl"/>

Php page
Thinkphp jumps to the original page after modification
Modification Method
$ Surl = $ _ POST ['surl'];
Unset ($ _ POST ['surl']);
Add
$ Ren = $ brand-> where ("id = $ id")-> data ($ _ POST)-> save ();
If ($ ren = false)
{
$ This-> error ("brand modification failed", $ usrl );
}
Else
{
$ This-> success ("brand modified successfully", $ surl );
}
You can jump back to the original modification page.

-------------------------- Zend studio -------------------------------

The zend studio 12.5 editor does not display row numbers.

Solution: windows/genaral/editors/text editors/show line numbers

-------------------------- Mysql database -------------------------------

Backup database in linux
Modify permission chmod-R 777/var modify all permissions Under var in the root directory
Mysqldump-u root-p news>/var/new. SQL press enter and enter the password for backup.

 

In windows/dos, the backup database prompts that the client does not have the required privileges.
Solution:
Find c: \ windows \ system32 \ cmd.exe
Or start the "All Programs" Appendix "command prompt
Right-click the running mode, select an identity, and select "Super administrator.
Disk C and disk D fail to be backed up. You don't have the required privilege. You can change it to disk E!
Mysqldump-u root-p 20160514> e: \ a. SQL press enter and enter the password for backup.

 

Show variables like 'character % 'view database encoding settings

Set names gbk; tell mysql to return the gbk encoding command window. set utf8 In the encoding database and set gbk in the Command window.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.