GithubHelp home page GithubHelp logo

wonderfan / php Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 64 KB

Web and Digital Transformation

Home Page: http://wonderfan.github.io

License: Apache License 2.0

PHP 97.33% CSS 0.92% SQLPL 1.75%
framework laravel magento php

php's Introduction

  • 👋 Hi, I’m @Afanti
  • 👀 I’m interested in programming and writing.
  • 🌱 I’m currently learning DeFi, NFT, Metaverse.
  • 💞️ I’m looking to collaborate on blockchain projects
  • 📫 You can reach me by twitter: Afanti.

php's People

Contributors

wonderfan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

php's Issues

Responsive Theme

The CSS Rules used in the links:

  • The html element is a;
  • The default css properties are color and text-decoration;
  • Add the hove and focus color changes.

Symfony Guide

Installing and Configuring Symfony

Using the Symfony Installer is the only recommended way to create new Symfony applications. This installer is a PHP application that has to be installed in your system only once and then it can create any number of Symfony applications.

$_SERVER

$_SERVER is an array which holds information of headers, paths, script locations. Web server creates the entries in the array.

nomenclature of templates

  • index.php: the initial page;
  • single.php: manage all display formats for individual post;
  • page.php: manage all display formatting for individual page;
  • home.php: manage all display formatting for home page. front-page.php can also be used;
  • archieve.php: manage all display formatting for post-listing page

wp admin

A class representing the admin screen

final class WP_Screen

network weathermap

使用require once函数加载其他目录的php文件;

使用标识符来代表一个功能是否开启;

使用new操作符创建一个ui的实例,随后执行modules check,随后使用change dir 内置函数改变目录,然后执行main方法,把全局特殊变量request作为参数;

all php 文件起到的是聚合和leader的作用,把其他需要的文件使用require once包含进去,这里面有一个阶梯include的问题;

post query

api是通过函数来提供的,具体的事情是由类来完成的,它们之间的纽带是global;

use statement

The ability to refer to an external fully qualified name with an alias, or importing, is an important feature of namespaces. This is similar to the ability of unix-based filesystems to create symbolic links to a file or to a directory.

The Closure class

Class used to represent anonymous functions.

Anonymous functions, implemented in PHP 5.3, yield objects of this type. This fact used to be considered an implementation detail, but it can now be relied upon. Starting with PHP 5.4, this class has methods that allow further control of the anonymous function after it has been created.

Besides the methods listed here, this class also has an __invoke method. This is for consistency with other classes that implement calling magic, as this method is not used for calling the function.

query data

There are two ways to query data: query php object and db functions

namespace feature

Using the use statement, we can bring one class from another namespace, into the current namespace. Allowing us to instantiate it by name only. Now don’t ask me why it doesn’t need the backward slash prefix, because I just don’t know. This is the only exception that I know of. Sorry about that! You can prefix it with a slash if you want to though, you just don’t need to.

应用启动文件

在index文件中的基本逻辑是:加载boostrap文件,创建一个boostrap实例,生成一个http的application对象,然后把这个application对象跑起来。

install php from the source codes

  1. download the source codes from php.net site
  2. Install libxml2-devel and zlib-devel module via yum
  3. run configure, make, make test and make install commands

Diving into Symfony

The Symfony application flow
Installing Symfony 2.1 by using Composer
The Symfony file structure and bundles
The console
Routes and controllers
Responses
Twig

WP Theme

The Theme Customization API, added in WordPress 3.4, allows developers to customize and add controls to the "Appearance" → "Customize" admin screen. The Theme Customization screen (i.e. "Theme Customizer") allows site admins to tweak a theme's settings, color scheme or widgets, and see a preview of those changes in real time.

Theme in Mage2

The match media is used to do the responsive design via js power.

如何实现调试?

首先要找到与调试有关的代码片段。与调试有关的几个常量有:
define( 'WP_DEBUG', false );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', false);

wp_debug_mode()函数根据调试常量的值,决定是否显示debug信息以及是否把debug信息写入日志文件

admin dashboard

使用require once 加载当前目录的admin 文件;

使用require once 加载 incude 目录下的dashboard 文件;

执行admin dashboad setup;

添加dashboard js文件;

根据user的权限,选择性的添加其他js文件

PHP PSR

PSR, which stands for "PHP Standards Recommendation."

How to use the AngularJS in the WP

  1. Use action to add the javascript;
  2. Create the all kinds of directives for post, page, media, comments and meta.
  3. Use the javascript event and send http request to interact with json API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.