承接 codedgr/router 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

codedgr/router

Composer 安装命令:

composer require codedgr/router

包简介

Route the URL variables to your project

关键字:

README 文档

README

Route the URL variables to your project

Install

Add the following to your .htaccess file in order to redirect everything to the index.php file.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ index.php

##Build the URL Define PARSE_URL with your domain name:

define('PARSE_URL','https://www.example.gr')

Use the url() function with as many attributes you want.

$url = Parse::url('class', 'method', ['var'=>'foo','foo'=>'boo']);

the above example will output

https://www.example.gr/class/method/var=foo&foo=boo

##Parse variables from a URL Contract the Parse object passing the URL and use the get method to get an array of variables.

$array = (new Parse($url))->get();

If we use the previous URL, this example will output

Array
(
    [0] => class
    [1] => method
    [2] => Array
        (
            [var] => foo
            [foo] => boo
        )

)

You may also pass which key your want get

$var = (new Parse($url))->get(1);

If we use the previous URL, this example will output a string method or false if there is no value

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固