/    Sign up×
Community /Pin to ProfileBookmark

Php Upload just asking

Hi…

Just asking whether in php upload i mean the enctype form….is it possible to put default value in browse text? if possible can someone just explain how to do that

Thanks
poyor7

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@SheldonJul 06.2006 — What, explain a bit more
Copy linkTweet thisAlerts:
@poyor7authorJul 06.2006 — Ok is like this in input type="file" for uploading file i want to put default value rather than using browse...so,i've googled it and the answer cannot put value or variable in input type="file" so i wondering whether it can be done using javascript or other technique so that i can put default value....

I found solution but using flash...i dont want using flash since i not good at it.

Thanks

Poyor7
Copy linkTweet thisAlerts:
@SheldonJul 06.2006 — No
Copy linkTweet thisAlerts:
@bokehJul 06.2006 — I found solution but using flash...i dont want using flash since i not good at it.[/QUOTE]Well if flash does allow this it is a major security blunder.
Copy linkTweet thisAlerts:
@poyor7authorJul 07.2006 — Hi...

I found something interesting but i bit blur and need some guidance....could anyone guide me through this example :http://us2.php.net/manual/en/ref.filesystem.php
Copy linkTweet thisAlerts:
@Heavy_MetalJul 07.2006 — Hi...

I found something interesting but i bit blur and need some guidance....could anyone guide me through this example :http://us2.php.net/manual/en/ref.filesystem.php[/QUOTE]

The only part I usually look at is the Table of Contents that you can find if you scroll down a bit, I usually look at the functions named in that list and find one I might need and go from there.
Copy linkTweet thisAlerts:
@poyor7authorJul 07.2006 — Can someone plz guide me where should i change the code so that it only show .csv file?

<PHP>

// ls(dir,pattern) return file list in "dir" folder matching "pattern"

// ls("path","module.php?") search into "path" folder for module.php3, module.php4, ...

// ls("images/","*.jpg") search into "images" folder for JPG images

function ls($__dir="./",$__pattern="*.*")

{

settype($__dir,"string");

settype($__
pattern,"string");

$__ls=array();

$__
regexp=preg_quote($__pattern,"/");

$__
regexp=preg_replace("/[x5C][x2A]/",".*",$__regexp);

$__
regexp=preg_replace("/[x5C][x3F]/",".", $__regexp);

if(is_dir($__dir))

if(($__
dir_h=@opendir($__dir))!==FALSE)

{

while(($__
file=readdir($__dir_h))!==FALSE)

if(preg_match("/^".$__
regexp."$/",$__file))

array_push($__
ls,$__file);

closedir($__dir_h);

sort($__
ls,SORT_STRING);

}

return $__ls;

}

</PHP>
Copy linkTweet thisAlerts:
@bokehJul 07.2006 — just use [B]glob()[/B] and set the file pattern to [B]*.csv[/B]
×

Success!

Help @poyor7 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...