1

index.phpには、いくつかのモジュールページ、_head.tpl、_foot.tplが含まれています

index.php:

<{include file="_head.tpl"}>
....
<php?
  ....
?>
<{include file="_footer.tpl"}>

_head.tpl

<html>
<head></head>
<body>
<{include file="$baseUrl/menu/index"}>
.....

URLを開くと:www.test.com/indexに「http500エラー」と表示されます

URLを開きます:www.test.com/menu/indexは動的コンテンツを取得できます。リストの内容を賢い文( <{include file = "$ baseUrl / menu / index"}>)ではなく "_head.tpl"にコピーすると、" www.test.com/index "がよく表示されます。

4

1 に答える 1

0

このように直接特定することはできません。php file_get_contents または Curl を使用してコンテンツを取得する必要があります。

ここを参照してください: http://www.smarty.net/forums/viewtopic.php?p=78900

于 2014-03-17T17:18:41.943 に答える