-------------------------html/css related-------------------- ---------------
The QR code at the bottom of the imitation Baidu/shrunk webpage is visible, and the text block on the right disappears. It turns out to be a width problem. Just change the width and make both divs 49%.
The li imitating Baidu/bottom will appear. Use list-style:none; for global processing. Put it in the body and it will be globally valid.
Use style="list-style-type:none", which is not very useful.
In the a tag The li inside can be valid, but the li inside p is invalid. It is better to use the global one
-------------------------FTP related WinSCP------------------------ ----------
I found a problem. When modifying ftp, there was no problem with the code, but it was always unsuccessful. Later I found out that it was a delay, and I changed the code, but ftp has not been updated yet, so it was always unsuccessful. It was a waste of time. Be sure to see the modification time in ftp before testing.
--------------------------WeChat development related-------------------- ---------------
WeChat development, graphic reply, put the public code in the controller into the new model file, create a new method in the new model, and put the public code into the method.
The definition in the instantiated model file in the controller is different depending on the thinkphp version. The video is version 3.1, and mine is 3.2.3. I couldn’t get it through the manual. The model definition in the manual needs to inherit model. This is the case of the operation table. , I didn’t use the database or tables at all, and finally removed the inheritance successfully.
Model code
namespace ImoocModel;
use ThinkModel;
class IndexModel
{ //Reply to WeChat messages with multiple image and text types
public function responseNews($postObj,$arr)
{
Controller code
namespace ImoocController;
use ThinkController;
class IndexController extends Controller
{
//instantiated model
$indexModel = new ImoocModelIndexModel();
$indexModel->responseNews($postObj,$arr);
---------------------------Virtual Host-------------------- ------------------
For projects arranged on the virtual host, accessing http://www.long.com/imooc.php/Index/http_curl is unsuccessful
Only http://www.long.com/imooc.php
The reason is that the default is Normal access mode //www.huqunlong.com/imooc.php&c=Index&a=http_curl Only in this way can you successfully access
Find the thinkphp configuration file convent.php to change the mode. Later, I found that setting pathinfo directly on the virtual host control panel page was successful.
Visit http://www.long.com/imooc.php/Index/http_curl successfully
---------------------------------memcached related-------------------- ----------
When installing memcached using cmd on Shenzhou Ares Z7M under Windows 10, an error occurred: failed to install service or service already installed
Solution:
1. Find the cmd.exe file (c:windowssystem32cmd.exe)
2. Right-click cmd.exe to run as administrator
Memcache installation under windows
1. Download the Windows stable version of memcache from Baidu, unzip it and put it in a disk, such as c:memcached
2. Enter 'c:memcachedmemcached.exe -d install' in the cmd command interface to install
3. Then enter: 'c:memcachedmemcached.exe -d start' to start. Right-click on the computer/Manage/Service/View memcached service has been started. The installation is successful
If you want to uninstall, execute the following command:
1.memcached.exe -d stop
2.memcached.exe -d uninstall
When you want to use it, copy the files in memcache to the project file under WWW to use memcache
The column 'id' in the where clause is ambiguous. There is no indication of which table the id belongs to. The id field exists in multiple tables
Two tables have the same field state
Solution: Configure the bin directory of mysql to the system's path environment variable
Find the installation directory of MySQL, mine is D:phpStudyMySQLbin
Right-click Computer Properties/Advanced System Settings/Environment Variables/System Environment Variables/Path Environment Variables/Edit/Edit Text
Add at the end of the variable value;D:phpStudyMySQLbin
php page
Thinkphp jumps to the original page after successful modification
Modification method
$surl=$_POST['surl'];
unset($_POST['surl']);
Add
$ren when jumping =$brand->where("id=$id")->data($_POST)->save();
if($ren===false)
{
$this->error( "Brand modification failed",$usrl);
}
else
{
$this->success("Brand modification successful",$surl);
}
You can jump back to the original modified page
-----------------------------zend studio related-------------------- ----------
zend studio 12.5 editor does not display line numbers
Solution: windows/general/editors/text editors/show line numbers
--------------------------mysql database related-------------------- ----------
Back up the database under Linux
Modify permissions chmod -R 777 /var Modify all permissions under var in the root directory
mysqldump -u root -p news>/var/new.sql Press Enter to enter the password Backup is successful
Backup database under windows/dos prompts that the client does not have the required privileges
Solution:
Find c:windowssystem32cmd.exe
Or start》All Programs》Attachments》Command Prompt
Right-click and select Run Mode, select Identity, and select Super Administrator Just run it.
The backup of C drive and D drive failed because they did not have the required privileges. So I changed it to E drive. Alas, it was successful!
mysqldump -u root -p 20160514>e:a.sql Enter Enter password Backup successful
show variables like 'character%' View database encoding settings
set names gbk; tells mysql to return the gbk encoding. The command window sets the encoding. The content in the database is utf8. The command window needs to set gbk