The unreasonable permission setting of website files on the server is one of the reasons why the website was breached (hacked). Therefore, for the security of the website, it is recommended to set the permissions of website files. The following is the setting content transferred from the Z-Blog official blog "ZB File Permission Security Setting Guide". Pagoda users can operate in the file management of the pagoda panel,Non pagoda users can operate through tools such as sftp or putty.Setting guide: 1. directories and subdirectories with w permission and all files under them zb_users/cache zb_users/upload. 2. directories with w permission and their subdirectories z need to be deleted
The Apache server edits the application information in the background theme management of the zblog website. After submission, 400 errors occur and the website cannot be accessed. The prompt is as follows: Bad Request Your browser sent a request that this server could not understandSize of a request header field exceeds serve...
The user created by zblog during installation is the highest level administrator of the website, namely the root level administrator. This account has all the management permissions of the website, including but not limited to application upload, application export, application deletion, and system update. After the root permission of the super administrator is cancelled, this account will no longer be able to install/delete/export theme or plug-in applications, and cannot update the system.There are many different ways to cancel the root management permission, which can be selected according to the needs.Z-BlogPHP 1.7.3 and higher versions put the. env file in the system root directory, and add the code: ZBP_PRESET_DISABLE_ROOT=1 Z-BlogP
Many topics will read all the tags of the article as keywords in the content page by default, and the way to read the tags usually uses traversal. This is because many topic authors do not look at the source code of zblog php program, so they do not know that zblog itself provides the function TagsToNameString() to obtain all the tags of the article, and can be called directly using template tags,There is no need to traverse the splicing in the template.Get template tags of all article tags on the article page: $article ->TagsName Get directly with the function $article ->TagsToNameString() Code location: zb_sys
For a long time, for article thumbnails, the general calling logic of most Z-Blog PHP themes is: first, get the first picture of the article content. If there is no picture in the article content, call a fixed default picture stored in the theme directory.This thumbnail call method is also suitable for most types of websites, but some websites are mainly text based, with few pictures, which will result in a large number of default thumbnails and poor visual experience.To avoid this problem, the plug-in method can use the plug-in that automatically generates random pictures. For example, the zblog plug-in introduced in zblog article Automatic Generation of Random Pictures Plugin zltheme_Figure earlier in the blog bar can
If you haven't logged in to your website for a long time, you will inevitably have a password background password. Although this is not a serious problem, for novice Xiaobai users, you don't know how to retrieve the zblog password for a while.In fact, if you forget the login password of zblog, you can reset the password through the nologin.php tool provided by the zblog administrator, and the operation is simple.Steps to reset the password: 1. Download the tool file: Z-Blog official forum; 2. Unpack the downloaded zip file to nol
After zblog is upgraded to zblog 1.7.3.3260 or higher under normal use, the login background prompts illegal access, incorrect verification code, and non display of verification code. This may be because two protection functions for background login have been added since zblog 1.7.3.3260. When the theme plug-in has compatibility problems or other problems, the above problems occur.The temporary solution is to turn off the CSRF protection function or verification code function in option.php, or both.Edit the zb_users/c_option.php file of the website and add the following code://Close CSRF
Z-Blog uses the {template: pagebar} to call the page turning bar, which uses the ‹, ‹, ›, ›› symbols to represent the first page, the previous page, the next page, and the last page respectively. What if you don't want to use symbols to directly display Chinese?You can try to use the flip bar source code to modify or modify global variables, and the method is simple.Operation method: 1. Edit the include.php file of the current theme, find the ActivePlugin_ theme ID function, and add the following code $zbp ->lang ['msg '] ['first_button']='home page'$zbp->lang['...
When developing zblog topics, the page turning bar of the article list page is habitually called with {template: pagebar}. This tag is used to call the pagebar.php template under the theme template directory. If the template does not exist for the theme used, the default pagebar.php template will be called. If you want to customize the page turning HTML code slightly,You can extract the code and put it on your own topic.Operating steps: 1. Create a php file in the template/directory of the current theme, named pagebar.php, and add the following code to the
PHP obtains the element of a key value in the array, which is a common requirement in Z-Blog theme and plug-in application development, and the implementation code is relatively simple.However, Z-Blog also has a built-in function GetValueInArray() to obtain the element of the specified key value from the array. Using the built-in function, isset judgment can be omitted. At the same time, it internally encapsulates the judgment of whether the required key value exists. If it does not exist, the specified parameter will be returned.Function structure GetValueInArray ($array, $name, $default=null) Parameter description $array - array name, $name - subscript k is required
When developing zblog themes or plug-in applications, you need to obtain all images or the first image in the article content or other HTML code, usually through regular matching.However, since the zblog 1.7 version, the program has closed the GetImagesFromHtml() function, which obtains all images from HTML. With this function, you don't need to write regular matches by yourself anymore. You can call it directly by passing parameters.The function GetImagesFromHtml ($html) is used to obtain all pictures from HTML;Parameter $html - string,HTML code or related variable return value returns a
Get GETThe passed value of POST or COOKIE method is usually obtained by using $_REQUEST, $_GET, $_POST or $_COOKIE variables, and isset() is generally required to determine whether the variable is declared, which is a little troublesome.The function GetVars(), which encapsulates the HTTP Request method of PHP in Z-Log, simplifies the code and can quickly obtain the passed value without isset() judgment. When the variable does not exist, null is returned by default. It also provides optional parameters for the default return value, which is relatively convenient and easy to use.GetVa...
In the development of zblog topics or plug-in applications, it is inevitable that there will be a need to add new database tables. Adding new tables manually in the database will have little impact on self use applications, but it is not friendly for charging applications for many users. Therefore, it is necessary to automatically create corresponding database tables through code at the time of application startup.The following is a tutorial of Zblog php on user-defined database tables, which is transferred from the Z-Blog official library Wiki and uses the favorite article function as an example. It introduces table creation, addition, deletion, modification and query in more detail.Tip: This tutorial code only verifies the MySQL database, and the rest needs to be verified by yourself.Tutorial of Creating Tables Declare and Define Data Table Structure function
The WP Ban plug-in can implement the WordPress plug-in that blocks certain designated IP access websites.When a user in the forbidden IP range tries to access the website, the foreground will display a customized message of forbidden access
The mzablog theme is a set of zblog blog themes with white as the main body and blue as the embellishment.The theme is the structure layout of the left and right columns, the layout of the image text list, the responsive structure, and the design of the carousel map, recommended articles, popular articles, hot reviews
The [Comments] on the background of the WordPress website can be viewed by other roles such as contributors, in addition to the administrator. This is obviously unreasonable and will reveal the privacy of comment users, because who has comments in addition to comments
The unreasonable permission setting of website files on the server is one of the reasons why the website was breached (hacked). Therefore, for the security of the website, it is recommended to set the permissions of website files. The following is a copy of the official Z-Blog blog "ZB File Permission Security..."