zhiephie/slim-rajaongkir
Composer 安装命令:
composer require zhiephie/slim-rajaongkir
包简介
Check Ongkos Kirim RajaOngkir Slim Framework
关键字:
README 文档
README
Cek Ongkos Kirim (Slim+ RajaOngkir)
Install
Install the latest version using composer.
$ composer create-project --no-interaction --stability=dev zhiephie/slim-rajaongkir app
Slim Framework
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. Slim is easy to use for both beginners and professionals. Slim favors cleanliness over terseness and common cases over edge cases. Its interface is simple, intuitive, and extensively documented — both online and in the code itself. Thank you for choosing the Slim Framework for your next project. I think you're going to love it.
Features
- Powerful router
- Standard and custom HTTP methods
- Route parameters with wildcards and conditions
- Route redirect, halt, and pass
- Route middleware
- Resource Locator and DI container
- Template rendering with custom views
- Flash messages
- Encrypt cookie data
- HTTP caching
- Logging with custom log writers
- Error handling and debugging
- Middleware and hook architecture
- Simple configuration
Getting Started
Install
You may install the Slim Framework with Composer (recommended) or manually.
System Requirements
You need PHP >= 5.3.0. If you use encrypted cookies, you'll also need the mcrypt extension.
Hello World Tutorial
Instantiate a Slim application:
$app = new \Slim\Slim();
Define a HTTP GET route:
$app->get('/hello/:name', function ($name) { echo "Hello, $name"; });
Run the Slim application:
$app->run();
Setup your web server
Apache
Ensure the .htaccess and index.php files are in the same public-accessible directory. The .htaccess file
should contain this code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Additionally, make sure your virtual host is configured with the AllowOverride option so that the .htaccess rewrite rules can be used:
AllowOverride All
Nginx
The nginx configuration file should contain this code (along with other settings you may need) in your location block:
try_files $uri $uri/ /index.php?$args;
This assumes that Slim's index.php is in the root folder of your project (www root).
HipHop Virtual Machine for PHP
Your HipHop Virtual Machine configuration file should contain this code (along with other settings you may need).
Be sure you change the ServerRoot setting to point to your Slim app's document root directory.
Server {
SourceRoot = /path/to/public/directory
}
ServerVariables {
SCRIPT_NAME = /index.php
}
VirtualHost {
* {
Pattern = .*
RewriteRules {
* {
pattern = ^(.*)$
to = index.php/$1
qsa = true
}
}
}
}
lighttpd
Your lighttpd configuration file should contain this code (along with other settings you may need). This code requires lighttpd >= 1.4.24.
url.rewrite-if-not-file = ("(.*)" => "/index.php/$0")
This assumes that Slim's index.php is in the root folder of your project (www root).
IIS
Ensure the Web.config and index.php files are in the same public-accessible directory. The Web.config file should contain this code:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="slim" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Google App Engine
Two steps are required to successfully run your Slim application on Google App Engine. First, ensure the app.yaml file includes a default handler to index.php:
application: your-app-name
version: 1
runtime: php
api_version: 1
handlers:
# ...
- url: /.*
script: public_html/index.php
Next, edit your index.php file so Slim knows about the incoming URI:
$app = new Slim(); // Google App Engine doesn't set $_SERVER['PATH_INFO'] $app->environment['PATH_INFO'] = $_SERVER['REQUEST_URI']; // ... $app->run();
Documentation
http://docs.slimframework.com/
How to Contribute
NOTE: We are only accepting security fixes for Slim 2 (master branch). All development is concentrated on Slim 3 which is on the develop branch.
Pull Requests
- Fork the Slim Framework repository
- Create a new branch for each feature or improvement
- Send a pull request from each feature branch to the develop branch
It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually.
Style Guide
All pull requests must adhere to the PSR-2 standard.
Unit Testing
All pull requests must be accompanied by passing unit tests and complete code coverage. The Slim Framework uses
phpunit for testing.
Community
Forum and Knowledgebase
Visit Slim's official forum and knowledge base at http://help.slimframework.com where you can find announcements, chat with fellow Slim users, ask questions, help others, or show off your cool Slim Framework apps.
Follow @slimphp on Twitter to receive news and updates about the framework.
Author
The Slim Framework is created and maintained by Josh Lockhart. Josh is a senior web developer at New Media Campaigns. Josh also created and maintains PHP: The Right Way, a popular movement in the PHP community to introduce new PHP programmers to best practices and good information.
License
The Slim Framework is released under the MIT public license.
zhiephie/slim-rajaongkir 适用场景与选型建议
zhiephie/slim-rajaongkir 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 10 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「slim」 「rajaongkir」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zhiephie/slim-rajaongkir 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zhiephie/slim-rajaongkir 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zhiephie/slim-rajaongkir 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secure session middleware for Slim 3 framework
Adds request-parameter validation to the SLIM 3.x PHP framework
Slim Framework 3 CSRF protection middleware utilities
PHP Raja Ongkir API
Laravel Raja Ongkir API
RajaOngkir API wrapper for PHP 8.0+
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-29