slim

    0熱度

    1回答

    發生了一些真正怪異的事情,下面的代碼是來自我的Web服務使用Slim 3和Doctrine 2的請求,我想出了一個空的響應,我知道一個事實該數組已滿,但它返回空! $data = $request->getParsedBody(); $intervention_items = $this->em->getRepository('App\Entity\V_Interventionitem

    0熱度

    1回答

    我試圖將數據傳遞給中間件,並基於Accept HTTP頭對其進行格式化。 控制器從數據庫獲取數據並將其傳遞給響應對象。 Response對象write()方法只接受字符串: public function getData(Request $request, Response $response): Response { return $response->write($this->get

    0熱度

    1回答

    我目前使用SLIM作爲API框架以通過JSON從Mysql數據庫返回一些值。使用PDO: // PDO database library $container['db'] = function ($c) { $settings = $c->get('settings')['db']; $pdo = new PDO("mysql:host=" . $settings['host

    0熱度

    1回答

    我有一箇舊的項目我正在使用修身版2到3 我試圖樹枝融入苗條2 ,同時也保持了舊我不能升級默認slim2渲染器。 目前我有這個。 class TwigView extends \Slim\View { public function rendertwig($template,$data = array()){ global $twig; $twigResults

    -2熱度

    1回答

    得到使用超薄2 Framwork http://localhost:8080/serverEndModule1/v1/varifyid = OQ == &碼= 1e212ffc375e52a9c6e7debe8adcc17 使用下面的代碼從URI屬性: $app->get('/varify', function() use ($app) { $id = $app->request->get('i

    3熱度

    1回答

    有沒有辦法獲得當前版本的苗條?像一個PHP代碼表達式或者這樣會顯示腳本當前正在運行的真實版本?

    0熱度

    1回答

    我剛開始使用Slim Framework創建我的rest API。一切正常,直到我嘗試將HTTP請求路由到靜態類方法(我之前使用匿名函數)。下面是我的新航線代碼上index.php: include "vendor/autoload.php"; $config = ['settings' => [ 'addContentLengthHeader' => false,

    0熱度

    1回答

    我已經在godaddy服務器上部署了我的slim api項目文件夾,但上傳後無法使用。我怎樣才能上傳godaddy服務器。

    1熱度

    1回答

    我正在使用此library。我想在我的網址的可選參數 比如我有這條路線 $app->get('/files/{order:\d+}[/{all:0|1|all}]', 'myctroller'); 我的註釋是 /** * @SWG\Get(path="/doc/v1/files/{id_ordine}/{all}", * tags={"GETFILE"}, * produces={"ap

    0熱度

    1回答

    我在slim framework v2中編寫了一個用於身份驗證的中間件。 這裏是教程:http://docs.slimframework.com/routing/middleware/#what-arguments-are-passed-into-each-route-middleware-callable $app->get('/cases/shared/group/:group_id', 'a