can you do method overloading in php as you can in java?
Javier
_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
PHP General Mailing List (http://www.php.net/)
T
here's a couple of the more tricky code snippets which should make it easy
for folks to see how a multiple file upload select can work - the rest is
basically a lot of interaction with the database - storing / retrieving the
upload list.
Its a bit tricky but worth it though - the users responci
Is it posible to do multiple file upload without selecting each file manual
in multiple form fields?
Yes. I have recently implemented an upload mechanism based on hotmails add
attachment mechanism. haven't got time for a detailed explanation but here
is the basic idea -
on your html page -
/
I'm using this code to various files for download via a http header -
$filename = basename($filepath);
header("Content-type: unknown/unknown");
header("Content-Disposition: attachment; filename=$filename");
readfile($filepath);
works fine in most cases - the save dialogue appears. However -
IE
rather than using echo why not just do this -
?>
onresize="window.location.reload(false)" topmargin="1" bottommargin="0"
leftmargin="0" rightmargin="0">
?>
this way you don't have to worry about getting the quotes right...
Hello,
"Aaron Merrick" <[EMAIL PROTECTED]> wrote:
Folks,
Can'
ing 'magic bytes' of
known file formats.
hope this is useful to some of you...
javier
From: "David Russell" <[EMAIL PROTECTED]>
To: "'Javier Montserat'" <[EMAIL PROTECTED]>
Subject: RE: [PHP] left click downloads
Date: Tue, 12 Nov 2002 13:46:58 +02
I want to make it easier for people to download files from my website by
having the download start when the visitor clicks a link (as opposed to
right click / save target as).
How can I achieve this with PHP? Do I include the file in a header() call ?
Thanks,
javier
_
ahhh. a combination of incorrect timezone on my new laptop and the server
time being slightly out was causing my head a lot of pain...
thanks for the pointer,
Jav
>From: Marco Tabini <[EMAIL PROTECTED]>
>To: Javier Montserat <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTE
Hi
I've successfully been using the following code to set cookies in IE / NS /
Mozilla. I've just bought a new laptop and in IE 5.5 and 6 the cookies are
not being set by my site. Other sites (msn etc) set cookies fine. I've
installed Mozilla and this accepts cookies fine. WTF is wrong wit
Hi
Single quote's in strings entered via a text input field are subsequently
appearing with what appears to be an escape character -
comm\'ents
how can i correct this? I've tried
htmlspecialchars($string, ENT_QUOTES);
and
htmlentities($string, ENT_QUOTES);
but these don't seem to work (maybe
Hello Everyone,
I've developed a feature which allows clients to upload files to a dir on
the server. I want to allow clients to email a url to the file as follows
:-
http://www.mysite.com/clientX/file01.jpg
I want to setup challenge / response authentication on the client folder so
that wh
$filename = strtolower (eregi_replace ("[^A-Za-z0-9_.]", "_", $filename));
seems to be what I want.
thanks to everyone for the help
Javier
_
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
PHP General
i want to format the filename of an uploaded file as follows :-
-- replace blankspace with "_"
-- remove any illegal characters.
Which string functions should I use to do this?
Thanks,
Javier
_
Join the worlds largest e-mail
>Spend some time learning about xml and you won't regret it
Could you (or anyone else on the list) recommend some good resources (Books
/ Websites) for learning XML and XSLT?
Thanks,
Javier
_
MSN Photos is the easiest way to s
I believe the following discussion from Web Application Development with PHP
4.0 (available online at http://safari.oreilly.com) may shed some light on
your question...
>>
Whenever PHP encounters a statement for which write access to a variable is
needed, it evaluates and calculates the data
Hi,
Syntax B doesnt seem to work exactly because as you say "it doesn't directly
access the 'bars' variable...";
here...
$reference_to_bar = $this->GetBar($id) ;
it seems that a copy of the bar object is being created, which is a new
object. This new bar object is not related to the bar obj
i think because you assign a method to the variable rather than a data
member you need to include parenthsis...
a::test()
>>
I have problems to make a dynamic call, please help me
returns:
Fatal error: Call to undefined function: a::test() in
/usr/local/share/version2.mypsi.de/index.
really simple one -
does someone have a bit of code that will variously display 'good morning',
'good afternoon', 'good evening' based on the current time?
good morning from london,
Javier
_
Send and receive Hotmail on your mob
i have the following code which reads a list of files from a directory -
$listcmd = "ls " .$dirPath;
$temp = exec($listcmd, $listoffiles, $status);
if($status == 0) {
for ($i =0; $i < sizeof($listoffiles); $i++) {
$this->fileName[$i] = $listoffiles[$i];
$this->sizeofFile[$i] = sprintf("%01.
different approach using JavaScript...
// drop down redirect
function doRedirect(value) {
if ((value != "") || (value != "0")) {
self.location=value;
} else {
alert('Please Make a Selection');
return false;
}
}
//-->
< make a selection >
Bueno,
Javier
Turning off register globals and referencing variables through the new array
syntax certainly gives a greater degree of control over the origin of data;
ie: a variable referenced $_POST['foo'] has (most likely) been received as a
result of http post and it's reasonably safe to assume $_COOKIE['
machine generated xml privacy statement,
>then stability with regards
>to cookies is not guaranteed. Do a search and read up about it. Check out
>w3c's site.
>
>- Original Message -
>From: "Javier Montserat" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTEC
I'm setting a session cookie with the following code -
function setSessionCookie(){
$expires = time()+$this->session_expires;
$issetCookie = setcookie("$this->cookiename",
"$this->sess_id",
"$expires",
"/",
the filename field is of type 'oid' rather than 'character varying'...
yep, inserting a string into an oid feild will make the db baarrrfff...
Saludos
Javier
_
Chat with friends online, try MSN Messenger: http://messenger.msn.co
Hello PHP people...
I'm trying to insert a filename (string) into a postgres database field but
the insert query is failing -
Warning: pg_exec() query failed: ERROR: oidin: error in
"abc_abcde012_010_mpeg1.mpeg": can't parse "abc_abcde012_010_mpeg1.mpeg"
in /usr/local/apache/htdocs/filename.ph
i'm using the following code to create a directory :-
$temp = exec("mkdir $path");
it doesn't work...
i've validated the $path var which is correct. i suspect it is a
permissions issue.
what should i look for to resolve this?
thanks,
javier
__
at to do in the even that a file need sto be removed
> // from the database.
>break;
>}
>
>Basically, whatever the value of $action, that is what section of code will
>execute. Hope that helps!
>
>Martin Clifford
>Homepage: http://www.completesource.net
>Develop
is there a more programmatically elegant way of saying...
$isError = "";
function main() {
doStep1();
if (!$isError) {
doStep2();
}
if (!$isError) {
doStep3();
}
// etc. etc.
}
function doStep1() {
if ($something) {
$isError = 1;
}
}
f
For a really good overview of the OO programming read "Thinking in Java" by
Bruce Eckel. What you learn can then easily be applied to your coding
practices in PHP.
The author has made the book available for free from his site
www.mindview.com
_
I've been developing a simple (protecting nuclear secrets it aint) login /
authentication class library.
This code is designed to -
1. check unname & password are completed
2. check uname & password contain only permitted chars (a-z,1-9)
3. match user against dbase user table
4. generate a uniq
30 matches
Mail list logo