October 13th, 2005, 11:03 AM
|
#1 (permalink)
| | Member
Join Date: Jan 2005
Posts: 38
|
I'm using a php script to upload a particular page, this script usually works fine and uploads all my files great, however this one page i have is quite long in length and whenever i upload it and try to view it the bottom of the page is cropped off. It's really odd, I go to look at the uploaded page and view it's source code and the code just suddenly stops mid-sentence. I guess something must be limiting it.
Heres the code used to upload (guess it must be this coding thats causing it):
if ($_GET["what"] == "upload"){
$textareavalue = "";
$file = fopen($_FILES['htmlfile']['tmp_name'], "r");
while ($line = fgets($file, filesize($_FILES['htmlfile']['tmp_name'])))
{
$textareavalue .= $line;
}
fclose($file);
}
Any ideas? been stuck on this for hours and hours now, starting to get a headache, so any help is much appreciated. |
| |
October 13th, 2005, 01:38 PM
|
#2 (permalink)
| | Real gangstas sip on Yacc
Join Date: Oct 2001 Location: Suckas-ville
Posts: 4,549
|
How big is the page in question?
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
|
| |
October 13th, 2005, 01:44 PM
|
#3 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 13,871
|
So...you are using a php uploaded that is on your site...and you want to upload the web page you want there with that?
If that is the case, why don't you try something like FileZilla to upload the page? |
| |
October 13th, 2005, 09:54 PM
|
#4 (permalink)
| | Member
Join Date: Jan 2005
Posts: 38
|
The page isn't that large, i tried changing the max php filesize upload from 2 to 10 megs in my .htaccess file and still no luck.
Basically i have to use this specfic php script to upload a few of my pages, and it's usually no problem but its just this one page that is longer than the rest. Wondered whether there is some default line limit on the php coding that is restricting it. |
| |
October 13th, 2005, 10:02 PM
|
#5 (permalink)
| | Ultimate Member
Join Date: Oct 2001
Posts: 21,026
|
is it possible you're running into the limit of the variable itself?
It looks like you're reading in the text of the html file and putting it into a value
(I'm new to PHP, so I'm speaking strictly from a developers view)
find out how many characters are in the file you've uploaded.
I dont know how PHP handles strings so its tough for me to say, but its something to consider. |
| |
October 13th, 2005, 11:31 PM
|
#6 (permalink)
| | Member
Join Date: Jan 2005
Posts: 38
|
I have about 63,000 characters, and about 5,500 words. Think it has to be something with the character limit, but i'm also pretty new to php coding so not too sure whats causing the problem. |
| |
October 13th, 2005, 11:37 PM
|
#7 (permalink)
| | Ultimate Member
Join Date: Oct 2001
Posts: 21,026
|
if its around 65,536 (think thats it) thats 64k so quite possible a limit. |
| |
October 13th, 2005, 11:53 PM
|
#8 (permalink)
| | Member
Join Date: Jan 2005
Posts: 38
|
Thanks for the help all but I finally figured out what it was, the information was being uploaded to a MYSQL database, and the field it was going into wasn't large enough....phew
love it when you fix a problem thats been nagging you for days
cheers all |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | Download/Upload - PHP | PyroSama | Webmastering and Programming | 1 | June 3rd, 2005 08:23 PM | | php upload and execute? | e980238 | Webmastering and Programming | 1 | December 15th, 2003 02:11 PM | | Most Active Discussions | | | | | Recent Discussions  | | | | | |