本文整理匯總了PHP中MySql::fetcharray方法的典型用法代碼示例。如果您正苦於以下問題:PHP MySql::fetcharray方法的具體用法?PHP MySql::fetcharray怎麽用?PHP MySql::fetcharray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MySql
的用法示例。
在下文中一共展示了MySql::fetcharray方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: iconv
$img_path = $img_path . $_FILES['file']['name'];
$target_path = ".." . $img_path;
$target_path = iconv("UTF-8", "gb2312", $target_path);
if (!move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
echo $target_path;
echo "服務器保存文件失敗";
} else {
chmod($target_path, 511);
$history = new History(null, $user, null, $img_path, null, null, null);
/**
* 插入
*/
$sql = $history->getInsertSql(TABLE_HISTORY, $user);
$mysql = new MySql();
$mysql->query($sql);
/**
* 查詢
*/
$sql = "SELECT `id` FROM " . TABLE_HISTORY . " WHERE img='" . $img_path . "'";
$result = $mysql->query($sql);
$value = $mysql->fetcharray($result);
$history = History::getHistory($value);
echo $history->id;
/**
* 開啟匹配程序
*/
$fp = fsockopen("localhost", 80);
fputs($fp, "GET /logodoctor/php/processCore.php?path={$target_path}\r\n\r\n");
fclose($fp);
}
}