1 頁 (共 1 頁)

[問題] 關於上傳檔案

發表於 : 2005-06-15 13:46
minotaur
如果我是傳檔到自有的FTP空間是否也有
php 組態只允許 2MB 的最大上傳限制的設定問題

因為我傳檔超過3mb就會出現\r
Tried to upload empty file
錯誤訊息

發表於 : 2005-06-15 20:21
Sailfish
restore database <~~~~~~~ 這個可以解決你的問題唷^^

有疑問的話 搜尋一下 竹貓都有^^

發表於 : 2005-06-15 20:36
minotaur
不是很懂耶\r

搜到的都是資料庫還原的問題
我這個應該不是這方面的吧\r

能否請大大們多給予提示呢

發表於 : 2005-06-15 22:52
kp3011

發表於 : 2005-06-16 11:09
minotaur
I've found several solutions for restoring large DBs, but none as simple as this "emergency hack". As long as you have FTP access to the forum, you can probably use this method.

Using the FTP client of your choice, upload your backup.sql file to phpBB/admin/, where backup.sql is the name of your backup file and phpBB is the name of your forum root directory.

It could probably take a while to upload, so go get a cup of coffee or check your email... or something.

When the file is finished uploading, you need to modify ONE phpBB file. Notice phpBB/admin/admin_db_utilities.php is in THE SAME directory that you just uploaded your backup.sql.

In phpBB/admin/admin_db_utilities.php find the code snippet:

Code:

else
{
$sql_query = fread(fopen($backup_file_tmpname, 'r'), filesize($backup_file_tmpname));
}



Now we can force phpBB to read our file by replacing the above code with this code ("backup.sql" is the name of your backup file, and the quotes are required):

Code:

else
{
$sql_query = fread(fopen("backup.sql",'r'), filesize("backup.sql"));
}





Go into your phpBB Admin Control panel, click the Restore Database link.



Type anything you want into the textbox, but don't leave it empty.Click the Start Restore button and your Database will start restoring immediately (no more uploading required). It may take a couple minutes for the process to finish, so go get another cup of coffee. When you get back, it *should* tell you that the DB was properly restored.

Just for security, restore your phpBB/admin/admin_db_utilities.php file to its original state and delete the phpBB/admin/backup.sql file. This will prevent "accidental" restoration (there are no safeguards in place for this method/hack)

小弟英文不強\r
能幫大概翻譯一下嗎
我用軟體翻譯也嘗試做過
可是也是出現一樣的錯誤耶\r
可能是翻譯翻的不好做錯了
我該怎麼辦