0
新しい角度およびOracleへ... PHPとMySQL
との良好な
チュートリアルhere後は、それがOracle
で仕事にしようとしてmySQL
で正常に動作します。以下
はデータIがlocalhost/xyz.php<br >
に移動した場合に問題がデータを以下に未定義である上記エコーで結果を見ることができるTypeError例外:プロパティ「データ」を読み込めません未定義AngularJSの
.php -> .js -> .html (template) -> .html (ng-view)
**abc.php**<br>
$data['data'] = $json; <br>
$data['total'] = oci_fetch($result); <br>
echo json_encode($data);
をフェッチするstructreあります。上記の.jsで
**abc.js**<br>
dataFactory.httpRequest('api/getData.php?page='+pageNumber).then(function(data)<br> {<br>
<pre>alert($scope.data);<br>
$scope.data = **data**.data;<br>
$scope.totalItems = **data**.total;<br>
});
私はerorr "TypeError例外を:未定義のプロパティ'data'
を読み取ることができません" を取得。太字で示されたデータには下線が引かれている。
助けてください。 ...あなたが実際に使用可能なものにデータをフェッチするためにoci_result
を使用する必要がhttp://php.net/manual/en/function.oci-result.phpから
$sql = 'SELECT location_id, city FROM locations WHERE location_id < 1200';
$stid = oci_parse($conn, $sql);
oci_execute($stid);
while (oci_fetch($stid)) {
echo oci_result($stid, 'LOCATION_ID') . " is ";
echo oci_result($stid, 'CITY') . "<br>\n";
}
を -