回答編集履歴
1
追記
answer
CHANGED
@@ -6,4 +6,26 @@
|
|
6
6
|
$url = 'http://test.la/ma?action=match&match[0]=142264';
|
7
7
|
$jid = strstr($url, "match[0]=");
|
8
8
|
echo $jid;//match[0]=142264
|
9
|
+
```
|
10
|
+
|
11
|
+
**追記**
|
12
|
+
request()がおかしい。
|
13
|
+
エラー出ると思うけど。。。
|
14
|
+
以下は意図通り動きました。
|
15
|
+
|
16
|
+
```php
|
17
|
+
class TMP
|
18
|
+
{
|
19
|
+
private $tmp = 'http://test.la/ma?action=match&match[0]=142264';
|
20
|
+
public function input($url)
|
21
|
+
{
|
22
|
+
return $this->tmp;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
$request = new TMP;
|
27
|
+
$url = $request->input('url');
|
28
|
+
$jid = strstr($url, "match[0]=");
|
29
|
+
echo $jid;
|
30
|
+
?>
|
9
31
|
```
|