㈠ 我用php 生成靜態頁 由於生成的頁面過多有1000多個,生成到十幾條的時候就報錯了,請問高手怎麼辦
都加上@阻止錯誤,應該可以繼續
㈡ mysql_data_seek這個mysql的,那麼oracle的函數是什麼
這些問題最好是去查PHP手冊,這是我摘下來的:
■oci_bind_array_by_name — Binds a PHP array to an Oracle PL/SQL array parameter
■oci_bind_by_name — 綁定一個 PHP 變數到一個 Oracle 位置標志符
■oci_cancel — 取消從游標讀取數據
■oci_client_version — Returns the Oracle client library version
■oci_close — 關閉 Oracle 連接
■OCI-Collection->append — Appends element to the collection
■OCI-Collection->assign — Assigns a value to the collection from another existing collection
■OCI-Collection->assignElem — Assigns a value to the element of the collection
■OCI-Collection->free — Frees the resources associated with the collection object
■OCI-Collection->getElem — Returns value of the element
■OCI-Collection->max — Returns the maximum number of elements in the collection
■OCI-Collection->size — Returns size of the collection
■OCI-Collection->trim — Trims elements from the end of the collection
■oci_commit — 提交未執行的事務處理
■oci_connect — 建立一個到 Oracle 伺服器的連接
■oci_define_by_name — 在 SELECT 中使用 PHP 變數作為定義的步驟
■oci_error — 返回上一個錯誤
■oci_execute — 執行一條語句
■oci_fetch_all — 獲取結果數據的所有行到一個數組
■oci_fetch_array — Returns the next row from a query as an associative or numeric array
■oci_fetch_assoc — Returns the next row from a query as an associative array
■oci_fetch_object — Returns the next row from a query as an object
■oci_fetch_row — Returns the next row from a query as a numeric array
■oci_fetch — Fetches the next row into result-buffer
■oci_field_is_null — 檢查欄位是否為 NULL
■oci_field_name — 返回欄位名
■oci_field_precision — 返回欄位精度
■oci_field_scale — 返回欄位范圍
■oci_field_size — 返回欄位大小
■oci_field_type_raw — 返回欄位的原始 Oracle 數據類型
■oci_field_type — 返回欄位的數據類型
■oci_free_statement — 釋放關聯於語句或游標的所有資源
■oci_internal_debug — 打開或關閉內部調試輸出
■OCI-Lob->append — Appends data from the large object to another large object
■OCI-Lob->close — Closes LOB descriptor
■oci_lob_ — Copies large object
■OCI-Lob->eof — Tests for end-of-file on a large object's descriptor
■OCI-Lob->erase — Erases a specified portion of the internal LOB data
■OCI-Lob->export — Exports LOB's contents to a file
■OCI-Lob->flush — Flushes/writes buffer of the LOB to the server
■OCI-Lob->free — Frees resources associated with the LOB descriptor
■OCI-Lob->getBuffering — Returns current state of buffering for the large object
■OCI-Lob->import — Imports file data to the LOB
■oci_lob_is_equal — Compares two LOB/FILE locators for equality
■OCI-Lob->load — Returns large object's contents
■OCI-Lob->read — Reads part of the large object
■OCI-Lob->rewind — Moves the internal pointer to the beginning of the large object
■OCI-Lob->save — Saves data to the large object
■OCI-Lob->saveFile — 別名 oci_lob_import
■OCI-Lob->seek — Sets the internal pointer of the large object
■OCI-Lob->setBuffering — Changes current state of buffering for the large object
■OCI-Lob->size — Returns size of large object
■OCI-Lob->tell — Returns the current position of internal pointer of large object
■OCI-Lob->truncate — Truncates large object
■OCI-Lob->write — Writes data to the large object
■OCI-Lob->writeTemporary — Writes a temporary large object
■OCI-Lob->writeToFile — 別名 oci_lob_export
■oci_new_collection — 分配新的 collection 對象
■oci_new_connect — 建定一個到 Oracle 伺服器的新連接
■oci_new_cursor — 分配並返回一個新的游標(語句句柄)
■oci_new_descriptor — 初始化一個新的空 LOB 或 FILE 描述符
■oci_num_fields — 返回結果列的數目
■oci_num_rows — 返回語句執行後受影響的行數
■oci_parse — 配置 Oracle 語句預備執行
■oci_password_change — 修改 Oracle 用戶的密碼
■oci_pconnect — 使用一個持久連接連到 Oracle 資料庫
■oci_result — 返回所取得行中欄位的值
■oci_rollback — 回滾未提交的事務
■oci_server_version — 返回伺服器版本信息
■oci_set_action — Sets the action name
■oci_set_client_identifier — Sets the client identifier
■oci_set_client_info — Sets the client information
■oci_set_edition — Sets the database edition
■oci_set_mole_name — Sets the mole name
■oci_set_prefetch — 設置預提取行數
■oci_statement_type — 返回 OCI 語句的類型
㈢ PHP程序代碼
<?php
if(!defined('CORE_ROOT'))exit();
requireCORE_ROOT.'include/admin.inc.php';
require_onceCORE_ROOT.'include/image.func.php';
if(isset($_SERVER['HTTP_CONTENT_DISPOSITION'])&&preg_match('/attachment;s+name="(.+?)";s+filename="(.+?)"/i',$_SERVER['HTTP_CONTENT_DISPOSITION'],$info)){
$filename=fromutf8(urldecode($info[2]));
if(fileext($filename)=='php')aexit();
$newfilename=get_upload_filename($filename,0,0,'image');
$a=file_get_contents("php://input");
if(!checkuploadfile($a)){
uploaddanger($lan['danger']);
}else{
writetofile($a,FORE_ROOT.$newfilename);
}
}else{
$uptype='image';
if(isset($get_attach))$uptype='attach';
$filename=$file_filedata['name'];
if(fileext($filename)=='php')aexit();
if(!empty($get_utf8))$filename=fromutf8($filename);
$newfilename=get_upload_filename($filename,0,0,$uptype);
uploadfile($file_filedata['tmp_name'],FORE_ROOT.$newfilename);
$piccontent=file_get_contents(FORE_ROOT.$newfilename);
if(!checkuploadfile($piccontent)){
akunlink(FORE_ROOT.$filename);
uploaddanger($lan['danger']);
}
}
$moles=getcache('moles');
if(ispicture($filename))operateuploadpicture(FORE_ROOT.$newfilename,$moles[akgetcookie('lastmoleid')]);
$picurl=$homepage.$newfilename;
$insertarray=array('itemid'=>$get_id,'filename'=>$newfilename,'ispicture'=>1,'filesize'=>filesize(FORE_ROOT.$newfilename),'dateline'=>$thetime,'originalname'=>$filename);
if(isset($get_attach))$insertarray['ispicture']=0;
$db->insert('attachments',$insertarray);
$count=$db->get_by('COUNT(*)','attachments',"itemid='$get_id'");
$db->update('items',array('attach'=>$count),"id='$get_id'");
$msg="{'url':'".$picurl."','localname':'".$newfilename."','id':'1'}";
aexit("{'err':'','msg':".$msg."}");
functionuploaderror($msg){
aexit("{'err':'','msg':".$msg."}");
}
functionuploaddanger($msg){
uploaderror($msg);
}
?>