|
Actually I dont want that temporary file I just want to copy that file to the server. Then after if temporary file deletes then its ok for me.
But I don't know how can I copy that file to the server.
|
|
|
|
|
Probably, but can you please go to the suggestion forum and endorse my idea for a PHP forum.
Anyway your problem is that you seem not to have opened the "TEMPORARY FILE". The fopen should open the temp location where the uploaded file is stored. Does that work?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi I tried by another way that is
$ftp = ftp_connect("ftp.example.com");
$ftpLogin = ftp_login($ftp, "user_name", "*****");
$fileName = basename($uploadFileName['name']);
$uploadDir = "ftp://ftp.example.com/TempUpload/".$uploadFileName['name'];
move_uploaded_file ($uploadFileName['tmp_name'], $uploadDir);
ftp_close($ftp);
yet it is giving me following errors:
Warning: move_uploaded_file(ftp://ftp.example.com/TempUpload/Case Studies for uploading.doc) [function.move-uploaded-file]: failed to open stream: Invalid argument
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'c:/wamp/tmp\php90.tmp' to 'ftp://ftp.example.com/TempUpload/Case Studies for uploading.doc'
Can you tell me how I can solve this problem or why it is giving me such kind of error?
|
|
|
|
|
Your problem there is that you have not logged into the FTP server where to want to store the files. Try:
$uploadDir = "ftp://username:password@ftp.example.com/TempUpload/".$uploadFileName['name'];
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thank you.
Your single line of code is removing my four lines of warning.
Thank you so much.![Rose | [Rose]](https://codeproject.freetls.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
Hey no problem, Glad I could help you.
I am currently asking the site owners here to put a PHP forum in. Can you post your opinions here: Linkety[^]
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
Save the file uploaded and then use the saved one for FTP.
|
|
|
|
|
Does anyone know how to permanently add a toolbox tab to Visual Studio such that the Ajax Controls are loaded for every project?
|
|
|
|
|
|
Ask one.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Don't use caps
Don't use the word urgent
Post your code
Use code and pre tags!
Don't use the word 'doubt' when you meant to use 'question'
|
|
|
|
|
|
I have a database(mydb) with userid fild data.
and i want to use AspLogin control and other control that manage membership
that uses aspnetdb of asp.net application.
so
how i can use the userid of aspnetdb and bring it in my own database(mydb)
when the users loged in ?
thanks
|
|
|
|
|
You have a couple of options:
1. When a new user is created you can hook into the event, get the Guid and username and post that into your database then.
2. Use Membership.User.Guid (I think thats it, better double check), this returns the Guid of the current logged in user.
|
|
|
|
|
thanks for your attention.
but
there isnt any member or method like Membership.User.Guid
anyway thanks again
goodluck
|
|
|
|
|
Membership.GetUser().ProviderUserKey is what I meant. The method returns a type of System.Object but if your using SQL Server and the built in membership provider its of the type Guid.
|
|
|
|
|
Hi
I trying of use a xml file as database, i know what exist a library called openxml, but only find tutorials to sql server, exist openxml to php?.
If not exist openxml to php, how i can read a xml file with sql statements?, thanks very much for yours replys.
Greetings from Mexico
-----------------------
Cuando salga el sol, no estare aqui...
|
|
|
|
|
I must admit that I am not an expert with the openXML standard. However PHP's support of XML is fantastic (as of 5.1).
You have two choices:
The old DOM functionality (Link[^]), Which is great. The DOM classess work and are well tested.
Now PHP has recently documented the XMLReader (Linkety)[^] / XMLWriter (Linkety)[^] classes, which are the replacement for DOM. If you have any questions on them I can probably answer them or point you to the resource you need.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
PHP has COM library support and so do OpenXML Library.
Do you find some solution now?
|
|
|
|
|
Well no, What is OpenXML?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
|
Can you send me a link about how use openxml in php please?, i want make this:
SELECT field1, field2 FROM [XMLFILE] WHERE [CONDITION]
Where fields are xmlnodes
<?xml version="1.0" encoding="ISO-8859-1" ?>
<items>
<item>
<field1>some value</field1>
<field2>some value</field2>
</item>
<item>
<field1>some value</field1>
<field2>some value</field2>
</item>
<item>
<field1>some value</field1>
<field2>some value</field2>
</item>
</items>
Is possible make this in php reading the xmlfile with sql statements?, thansk very much
-- modified at 18:08 Monday 5th March, 2007
Manuel say: Greetings from Mexico, Cuando salga el sol, no estare aqui...
---------------------------------------
Web: http://www.otakuzone-fanzine.com
Forum: http://www.otakuzone-fanzine.com/foro
|
|
|
|
|
|
I need an Access style listbox that will
allow me to format columns like Gridview :
XXXX___YYY__1234
ZZZ____2222__3456
but allow line select so the user can click
anywhere on the line, (like it does now),
unlike Gridview which requires a
"Select button" column(control)
Reccomendations?
Thanks..;)
|
|
|
|
|
Hi
You can use datalist in this case.
1. For displaying data, use SP to concatenate different columns e,g.. col1 + '---' + col2 etc...
2. Set RepeatColumns = "1".
3. If a row is selected, then change the background color of that row using Javascript function. To call javascript function for each cell / row, add an event ItemDataBound of DataList.
I think this is possible...
Rate this message. Thank you. Harini
|
|
|
|