PHP converts a relative path URL to an absolute path URL
PHP converts a relative path URL to an absolute path URL
PHP code
/*** Convert a URL to a complete URL * convert the relative path URL
format. Compared with encodeURI (), this method will encode more characters, such. Therefore, if the string contains several parts of the URI, this method cannot be used for encoding. Otherwise, the URL will display an error after the/character is encoded.
Characters not encoded by this method :! *()'
Therefore, for a Chinese string, if you do not want to convert the string encoding format to the UTF-8 format (for example, when the charset of the ori
Data URI scheme allows us to include data in a webpage using inline-code, which can be used in Html, CSS, and Javascript.
Data URI scheme is often used to embed images into webpages. It is used as follows:
The data URI scheme format is as follows:Data: [
The format is relatively simple. We can see that the above img is a jpg image encoded with base64.Embed this
Next, we'll take a look at the second topic of Web Programming on Java: URL processing. The URL (uniform Resource Locator) Chinese name is a Uniform Resource locator, sometimes also known as the Web address. Represents a resource on the Internet, such as a Web page or an FTP address. This time we'll see that Java is like processing URLs. URLs can be divided into the following sections:
Protocol://host:port
Parse_url(PHP 4, PHP 5)
parse_url-resolves the URL and returns its components
descriptionArray Parse_url (string $url)
This function resolves a URL and returns an associative array containing the various components that appear in the URL.
This function is not used to verify the legality of a given
support virtual host, can work in 4, 7 layer (support multi-network segment);2, can add some of the shortcomings of Nginx such as the session of the maintenance, cookie guidance and other work;3, support the URL detection backend server;4, itself is just a load balancer software, simply from the efficiency of the haproxy more than Nginx has a better load balancing speed, in concurrent processing is better than nginx;5, Haproxy can load balance MySQL
is loaded, to automatically invoke the Ms-windows-store protocol, try to start the App Store app, and navigate to the specific application page:The method of using the protocol in the web is very simple, simply by analogy the URL of the Ms-windows-store protocol into an HTTP protocol to request it.2. Launch the store in the UWP appIn a UWP app, you can also start the App Store on your system. In fact, any protocol can be tried using the following API
After the MIT scheme system is correctly installed under Windows, the program menu will have an MIT scheme directory, including: Documentation: open the Scheme document mit GNU scheme in HTML format in a browser: Start scheme in Edwin environment. Edwin is an emacs-like edit
Registering an application to a URL protocol (http://msdn2.microsoft.com/en-us/library/aa767914.aspx)
ArticleAbout asynchronous pluggable protocols describes how to develop and process a new protocol.Program(Processor handlers ). In some cases, we may describe how to call another application to process custom protocols ). Register an existing application as a URL protocol processor. Once the application i
Sudo apt-Get install Mit-Scheme
The following software packages have dependency that cannot be met:
Mit-scheme: Dependency: libltdl3 (> = 1.5.2-2), but cannot install it
Download a deb of libtdl3 from this website, install it, And then install Mit-scheme.
Mit-scheme is a teaching language used by computer program const
, 400x600;1.img Labelwidth: 200px;height: 300px;2. Background imagewidth: 200px;height: 300px;background-image: url([emailprotected]);background-size: 200px 300px; // 或者: background-size: contain;Such a disadvantage, it is obvious, under the ordinary screen:1, the same download @2x pictures, resulting in a waste of resources.2, the picture because of downsampling, will lose some sharpness (or chromatic aberration).So the best solution is: Under differ
Scheme Jump ProtocolOverview: The scheme in Android is an intra-page jump protocol, a very good implementation mechanism, by defining their own scheme protocol, it is very convenient to jump to the various pages in the app,Through the scheme protocol, the server can be customized to tell the app which page to jump to,
($ url );Print_r ($ parts );
Array([Scheme] => http[Host] => www.jb51.net[Path] =>/welcome/)You can also write an algorithm on your own! As follows:Copy codeThe Code is as follows: function getParams (){$ Url = '/index. php? _ P = index _ a = show x = 12 y = 23 ';$ Refer_url = parse_url ($ url );$ Params = $ refer_
The first is PHP to get the current page URL:
Copy Code code as follows:
Get the current script URL
function Getcururl ()
{
if (!empty ($_server["Request_uri"]))
{
$scriptName = $_server["Request_uri"];
$nowurl = $scriptName;
}
Else
{
$scriptName = $_server["Php_self"];
if (Empty ($_server["query_string"]))
{
$nowurl = $scriptName;
}
Else
{
$nowurl = $script
The basic use of the MIT scheme is to install and start up the MIT scheme system is properly installed under Windows, and the program menu will have an MIT scheme directory that includes: Documentation: Open HTML scheme in browser format Documentation for the MIT GNU Scheme:edwin environment to start
cache space size is 500M, automatically clears the cached data that has not been accessed for more than 1 days, and the cache hard disk space is 15GProxy_cache_path/tmpfs_cache/proxy_cache_path levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=15g;server {Listen 80;server_name www.xxx.com;CharSet Utf-8;Access_log Logs/cache_test.access.log Main;Error_log Logs/cache_test.error.log warn;AutoIndex on;Index index.html;Location/{#使用缓存cache_one上面proxy_cache_path中定义的key_zone =cache_one;Proxy_ca
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.