Skip to content

Instantly share code, notes, and snippets.

View saber13812002's full-sized avatar
💭
stackoverflow+codegrepper.com

Saber tabatabaee yazdi saber13812002

💭
stackoverflow+codegrepper.com
View GitHub Profile
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use File;
class MakeViewCommand extends Command
{
/**
@saber13812002
saber13812002 / parse-url.php
Created June 14, 2018 09:25 — forked from bryanwillis/parse-url.php
Parse url. Break down a url to get the parameters / arguments. Very helpful....
<?php
$url = 'http://usr:[email protected]:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment';
if ($url === unparse_url(parse_url($url))) {
print "YES, they match!\n";
}
function unparse_url($parsed_url) {
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
cd install-directory/
#wget --no-check-certificate http://www.wordpress.org/latest.tar.gz
#tar xfz latest.tar.gz
#mv wordpress/* ./
#rmdir ./wordpress/
#rm -f latest.tar.gz
wp core download
Installing WP-CLI in Windows
WP-CLI is a tool for controlling WordPress through a console window.
thanks to author of this page on wensolutions.com
http://wensolutions.com/installing-wp-cli-in-windows/
For linux : https://www.jetbrains.com/help/idea/using-the-wordpress-command-line-tool-wp-cli.html
Although it is said that wp-cli requires UNIX-like environment (OS X, Linux, FreeBSD, Cygwin) environment however it is still possible to install in Windows environment.
@saber13812002
saber13812002 / php hello world
Created May 17, 2018 10:13
first php tutorial when you install xampp on windows and put this file in xampp html folders . by default C:\xampp\htdocs
<?php
echo 'hello world';
?>