タイトルに指定された問題に関して私を助けてください。なぜこの通知(12回):行90のapp_vsf.phpの初期化されていない文字列オフセット:0
コードセクションがある:
<?php
// framework related things in this file.
// vsf = Very Simple Framework
$vsf = new stdClass;
// default app_layout file
$vsf->app_layout = 'app_layout.php';
// define the 'index' file, where we should link back to.
// Need to include the path, otherwise S.E. friendly URLS get messed up.
$vsf->self = '/mapcal/index.php';
// to support search engine friendly URLS, grab data from PATH_INFO
if (isset($_SERVER["PATH_INFO"])) {
$tmp_array = explode("/",$_SERVER["PATH_INFO"]);
for ($index = 0; $index < count($tmp_array); $index++) {
// only want the odd elements, they are the parameters. The even ones are the values
if ($index % 2 == 0) { continue; }
$_REQUEST[$tmp_array[$index]] = $tmp_array[$index+1];
}
}
// these functions are for form error handling
$errorfields = array();
$errormsgs = array();
$errorwasthrown = FALSE;
function adderrmsg($field = '', $msg = '') {
global $errorfields;
global $errormsgs;
global $errorwasthrown;
if ($field) {
$errorfields[] = $field;
}
if ($msg) {
$errormsgs[] = $msg;
}
$errorwasthrown = TRUE;
}
function displayformerrors($errhdr = 'The following errors occured:') {
global $errorfields;
global $errormsgs;
if (empty($errorfields) and empty($errormsgs)) {return;}
if (! empty($errormsgs)) {
print "<p style='color: red;'>$errhdr<br>\n";
foreach ($errormsgs as $msg) {
print "• $msg<br>\n";
}
print "</p>\n\n";
}
}
function displayformlabel ($field = '', $label = '') {
global $errorfields;
if (in_array($field,$errorfields)) {
print "<span style='color: red;'>$label</span>";
}
else {
print $label;
}
}
function reuseform($formaction = 'new',$field_list = '',$query = '') {
if ($formaction == "new") {
foreach (split(",",$field_list) as $field) {
global ${$field};
${$field} = '';
}
}
elseif ($formaction == 'form') {
foreach (split(",",$field_list) as $field) {
global ${$field};
${$field} = $_REQUEST[$field];
}
}
elseif ($formaction == 'query') {
foreach (split(",",$field_list) as $field) {
global ${$field};
${$field} = $query[$field];
}
}
} // close function reuseform
?>
ない90ラインである:$ {$フィールド} = $クエリ[$フィールド]。
フォームには12個のフィールドが表示されていますが、これはなぜ表示されているのか、フォームフィールドのデータを編集目的で見ることができないという通知が12回表示されます。 この問題に関して私を助けてください。
で、このクイックフィックスを使用することができます。 – hjpotter92
変数変数... –
reuseformが呼び出される場所が不足しているようです。 –