By getting only the base filename, not full path to the file upload form
I can't get the full path of the file in the html code that I need for my script php to a video file of ftp. I shows the method of recovery of the info file in php first. My ftp_nb_fput fails because it cannot find the file because it assumes that it is on the server, not the local machine. I use this so I can see the progress of the transfer without too much code:
ANY HELP WOULD BE GREATLY APPRECIATED!
<? PHP
$source_file = isset($_POST['filen'])? ($_POST ['filen']):($_SESSION['filen']);
'
'
$fp = fopen ($fichier_source, "r");
$ret = ftp_nb_fput ($id_conn, $destination_file, $fp, FTP_BINARY);
While ($ret is FTP_MOREDATA)
{
$uploaded = 100 * ftell ($fh) / $file_size;
Print "$uploaded % full \n";
Continue downloading...
$ret = ftp_nb_continue ($conn_id);
}
If ($ret! = FTP_FINISHED)
{include 'upload_video_failed.htm';
output (1) ;}
else {include 'upload_video_db.php' ;}
fclose ($FP);
'
'
? >
"< FORM METHOD ="POST"ENCTYPE =" multipart/form-data"ACTION="./upload_video.php ">
< TABLE >
< b >
< TD > video < span class = "style1" > * </span > < table >
< TD > < INPUT NAME = "filen" id = "filen" TYPE = 'file' size = '30' class = "fields" > < table >
< /TR >
< b >
< TD > title < span class = "style1" > * </span > < table >
< TD > < INPUT NAME = "title" id = "title" TYPE = "text" size = "43" class = "fields" > < table >
< /TR >
< b >
< TD > class < span class = "style1" > * </span > < table >
< TD > < select name = "category" id = 'category' class = "h1" >
< option > select the category that best describes your video < / option >
< option > documentary < / option >
< option > Educational < / option >
Interesting facts < option > < / option >
< / select >
< Table >
< /TR >
< TR VALIGN = "top" >
Description < TD > < table >
< TD > < TEXTAREA NAME = "description" id = cols "description" = "32' RANKS '2' WRAP = class ="h1"> < / TEXTAREA > < table >
< /TR >
< b >
Term < TD > < span class = "style1" > < / span > < table >
< TD > < select name = "duration" id = "term" class = "h1" >
< option > 1 day < / option >
< option > 1 week < / option >
< option > 1 month < / option >
< option > 3 months < / option >
< option > 6 months < / option >
< option > 1 year < / option >
< option > until this that deleted < / option > < / select >
< Table >
< /TR >
< b >
< TD > tags < span class = "style1" > < / span > < table >
< TD > < INPUT NAME = "tags" id = "tags" TYPE = "text" size = "43" class = "fields" > < table >
< /TR >
< b >
< TD > < table >
< TD > < name INPUT = 'Submit' TYPE = "Submit" VALUE = "Upload" > < table >
< /TR >
< /table >
< / MAKE >
marcusinfla wrote:
ONLY PROBLEM, IT IS THAT I CAN'T DOWNLOAD THE VIDEOS MORE THAN 4 MB. I've included the attribute MAXLENGTH = 100000000 (100 MB) and it does not help.
ANY IDEAS?
A good idea is to read the PHP manual. As explained in the next page, the maximum size of the downloads is controlled by the PHP configuration directives: http://docs.php.net/manual/en/features.file-upload.common-pitfalls.php. Normally, the maximum size of an individual file is 2 MB, and the maximum total value is 8 MB. If you are on shared hosting, I doubt that if the hosting company will be willing to change the configuration directives to allow 100 MB mail, but you can always ask.
Tags: Dreamweaver
Similar Questions
-
When I launch Firefox, I get only the bottom of my browser in the Firefox window. I have the normal window for 1 second, but it changes in the background window only. So, without the toolbar or navigation. I have already reinstalled it, but it does not solve the problem.
Hello jonson00, please follow the troubleshooting steps in Firefox opens with a white or transparent window. If this solves the problem, it would be also interesting including the extension has a problem in your case. Thank you!
-
Uninstalled Potoshop Elements 7 on my old PC. Tried to install on the new PC, you get only "the code you entered is invalid." How can I install on my new PC, it's bought and paid for and if I look at my account, it is there. Cannot find any e-mailadress support. What should I do?
Error "serial number is not valid for this product". Creative Suite
http://helpx.Adobe.com/Creative-Suite/KB/error-serial-number-valid-product.html
-
timestamp get only date, time is not included in the selection...
Hi all
I have a question like that, here (defect_status) is a table with two columns of timestamp (start_date and end_date) including the date and time.
I selection of data in the table and return data as refcursor. When I'm extraction of cursor and printing data for the test, I get only part of date, part of an hour is not included when printing the data.
ex:
Ref_cursor OPEN TO select start_date, end_date defect_status;
Here start_date, end_date are the timestamps. but, I get only the date. part of the time not included.
Note: the statement select is written in dynamic sql.
can someone help me please. How can I get date with time.Hello
What of it?
Ref_cursor OPEN FOR select to_char (start_date,' dd/mm/yyyy hh), to_char (end_date,' dd/mm/yyyy hh) of defect_status;
Published by: Divya on October 12, 2010 12:25 AM
-
Get only the Apple logo on my iPhone 5 s
I get only the Apple logo on the iPhone 5 s. Tried to update and restore through iTunes but it would not be completed that.
Hello
On the computer, make sure that iTunes is up to date.
Mac
- Open iTunes.
- In the MenuBar at the top of your computer screen, choose iTunes > check for the updates.
- Follow the prompts to install the latest version.
Windows
- Open iTunes.
- In the MenuBar at the top of the iTunes window, choose Help > check for updates. Learn what to do If you see not the menu bar.
- Follow the prompts to install the latest version.
-
I followed the advice and imported IE Favorites, but only the first two files have met. How can I get all THE files across please?
Wow. I think I will like Firefox if the aid is so easily available, quick and as good as this. Fixed right away
Thank you very much
Kevod -
Hello world
Suppose I have a table emp that has thousands of lines of data. In this table of employees receive wages between 1000-10000.
Now I have to get only the employees whose salary is equal.
for example
empNo empName sal
----------- ------------- ---------
1 ram 5000
2 5000 Shyam
3 1000 Dilip
4 deepak 2000
5 sisi 1000
6 1000 Priya
so now...
Now without using ' select * from emp where Sal IN (5000,1000). "How can I get these employees with the same salary?
SELECT *.
EMP e1
WHERE EXISTS (SELECT 99 FROM emp e2 WHERE e2.sal = e1.sal AND e2.empno! = e1.empno)
or maybe
SELECT *.
WCP
WHERE sal IN (SELECT sal FROM emp GROUP BY sal HAVING COUNT (*) > 1)
-
I've lost the main screen for photoshop! I don't know what I did, but now when I open photoshop, I get only the tool bar at the top and a little on the sides. How can I go back to the normal screen?
Hi renaeb,
Would you go to the Windows menu in Photoshop and check the option framework application from the drop-down list.
Concerning
Sarika
-
How to get only the whole ticks on a horizontal axis of a graph?
Hello
Could someone help me find oout how to get only the whole ticks on a horizontal axis of a graph?
When I have a number less than 5, I get like 0, 0.2, 0.4 ticks... while I want it to be 0, 1, 2...
Thank you
Yannhealer
Try this Clara. Put this inbetween your chart labels:
Set the interval to meet your needs of 'tick '.
-
Original title: administrator Win7
I have win7 and IE11 running on a HP 8540p. I'm the only person authorized to use the laptop - I am the administrator.
I keep getting these messages that do not allow to use a file. What should I change to have privileges for all functions?
The second file is not cooperating and was not deleted.
"Not cooperating" can mean many different things. A real verbatim error message would be more useful. In the case of locked files, it is often possible to remove safe mode.
-
How can I get all the file in a directory name?
Purpose:
Try to get all the file in a directory name.
My code:
FileConnection fconn = (fileDirectory) Connector.open (FileConnection);
Listing files = fconn.list ();
Listing files = fconn.list ("*", true); Try
_SCREEN.updateDisplay (files); txt shows unreadable.
String filename = fconn.getName ();
_SCREEN.updateDisplay1 (fileName); Show WMMS.Try using fileconnection.getName (). -->, But fail.
Could someone give a tip to solve the problem?
Thank you for your attention,
You cannot print just an enumeration.
It is a collection that contains objects, in this case of strings, as you can see on http://www.blackberry.com/developers/docs/7.1.0api/javax/microedition/io/file/FileConnection.html#li...You can use a while construct to browse the enum, as:
While (files.hasMoreElements ()) {}
System.out.println (files. NextElement());
}
(do not know if you do not cast explicitly to a string for sysout, iirc) -
How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?
I have only:D: / images (where are necessary + not need files)-a list with only the necessary files-a list with new names for the files neededThank you.Hi Pustiu,
Thanks for posting in the Microsoft Community.
You want to know how to select the files in a folder using a list with the files you want and after that rename only the files using another list with desired new names.
I would have you post your query in the TechNet forums because it caters to an audience of it professionals.
Your query will be better addressed there.
Check out the link-
http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads
We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.
Thank you.
-
Import image - error 'cannot get all the files for this device. "
Try to import images from my camera - Canon T3i. Using both the SD card inserted into a reader and camera with battery connected USB Gets the error "unable to get all the files on this device. Please make sure that the equipment is connected correctly, or that the battery is charged. Files that have been achieved so far will be sent to multimedia elements. "All updates installed, running Vista x 64, 10 elements.
Okay, found the problem. Apparently the PSE does not like RAID1 arrays, which is a bit ironic, beings that she deals with photos, and people tend to do not like losing pictures. Newho, if anyone has this problem in the future, as workaround for Adobe not have their stuff together, rather than import directly to a RAID 1 has HARD drive table, import them on another drive, then copy them to your RAID array. Very disruptive and I wish adobe would just fix their problems (no other program has this issue, even video editing software... «and RAID 1 should really be used for that), but to use it as a workaround if necessary.»
-
computer crashed, have windows vista, indented leave, all the documents lost, can I get all the files, how to do it, in simple terms,
Thank you.
If by "computer of new beginning" you mean that you have started your recovery or disk restore factory set and reinstalled Windows, then the ability to recover your files is practically zero. You can try a utility like Recuva (http://www.piriform.com/recuva) but since you have rewritten the entire hard drive, it is highly unlikely that anything will be recoverable.
-
When only the url is displayed in the address list, it is much cleaner and easier to read, as in earlier versions.
Add code to the file userChrome.css below default @namespace.
@namespace url("https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */ .ac-title-box { display:none !important; }
The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.
- http://KB.mozillazine.org/Editing_configuration
- http://KB.mozillazine.org/Editing_configuration/troubleshooting
See also:
Maybe you are looking for
-
I have a problem emting my trash
There a PDF in there and when I try to vacuum, it indicates the pdf file is in use and I my can continue, skip, stop I pressed each one and it won't erase what I'm missing
-
Y410P WLAN intel centrino 2230 major connection problem
A few months ago, I bought my ideapad y410p and was very happy with her on the set of some time. Just last month my wireless has acted significantly upward, and I have no idea of what is happening. My home wireless router has been no change, but now
-
I just bought an Acer Aspire V Nitro, but I was already low on disk after installation of space a few apps. Looking at my readers, it seems that the C and the D are flopped - I have a set of TB of data on the D: drive and virtually nothing on the C:
-
Can't access the option full screen
I tried to fix it myself. I can access is no longer a mode full-screen. Once I'm in full screen for a split second I and then the screen goes into colored pixels. No picture. I think it might have something to do with the VIA Chrome 9HC IGP Windo
-
I have an older version of photo shop. I need an authorization code
I have an old version of photoshop and I need an authorization code. on the package it comes a CS but when it loaded information is Version 8"C:\Program Files (x 86) \Adobe\Photoshop.