私はこのコードに戻ってきましたが、もう一度試しましたが、いくつかのエラーが出たので、前回の回答に基づいて部分的に修正しました(これはJoomla!3.4.5でうまくいきました)
// build the JInput object
$jinput = JFactory::getApplication()->input;
// retrieve the array of values from the request (stored in the application environment) to form the query
$uriQuery = $jinput->getArray();
// build the the query as a string
echo 'index.php?' . JUri::buildQuery($uriQuery);
のJoomla! APIのドキュメント:JInput
- JUri
前の回答: はI found this周りグーグル:
<?php
// "unparse" the Joomla SEF url to get the internal joomla URL
JURI::current();// It's very strange, but without this line at least Joomla 3 fails to fulfill the task
$router =& JSite::getRouter();// get router
$query = $router->parse(JURI::getInstance()); // Get the real joomla query as an array - parse current joomla link
$url = 'index.php?'.JURI::getInstance()->buildQuery($query);
?>
私はJoomlaのでそれをテストしてみました! 3.4.4とその作業の罰金! Dunnoと一緒に使えるのなら1.5
あなたは '$ _SERVER ['REQUEST_URI']'を意味しないのですか? – Gumbo