| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Comments:
<0> wait does WindowsUser inherit from User? <1> yup <2> cl*** WindowsUser extends User <1> yes <1> okok <1> but what do i have to write in the IF <1> that's my question <0> aap: you wouldnt have the IF at all <1> wait, i'll modify it a bit <1> http://pastebin.com/657143 <1> now check pls <0> ok so when you use this, you're going to say <0> $userx = new LinuxUser(...) right? <0> or $usery = new WindowsUser(...) <2> Your trying to get the parent to call the child cl***? <1> yup dranger
<1> yup Gerry <0> aap: you dont need any of that code in User <1> the point is: linuxuser get 2 arg's, and winuser 1 <0> aap: php will call the bootcomputer() in LinuxUser or WindowsUser depending on which one you said the object was <1> well, i don't know what the object will be at that moment <0> but PHP does <1> yes <0> as long as you called it with LinuxUser or WindowsUser <1> but i have to know which arg's i have to p*** <3> hello everybody <0> get_cl***($object) <0> but that doesnt go inside User! <3> Can yoy help me with es simple file uploader form? <4> probably <5> Aap: don't p*** any arguments to bootcomputer(). Use other methods to set cl*** variables which it will use. <4> tin_nqn: have you already read http://us2.php.net/manual/en/features.file-upload.php ? <0> Aap: what crywolf said is even better <2> cyphor: doh! you beat me to the link <4> heh <3> I have a problem because I've named mi file input like "archivo" but when I submit the form the variable $archivo_name is empty <3> here is my script http://www.nqnwebs.com/novatium/spip.php?page=bolsa <4> if you have <input type="file" name="archivo"> then you can access the file name with $file_name = $_FILES['archivo']['name']; <3> I've readed this <3> rray $HTTP_POST_VARS. Note that the following variable names ***ume the use of the file upload name 'userfile', as used in the example above: <3> * $userfile - The temporary filename in which the uploaded file was stored on the server machine. <3> * $userfile_name - The original name or path of the file on the sender's system. <5> tin_nqn: where did you read that? <3> here http://www.plus2net.com/php_tutorial/php_file_upload.php <3> and here http://www.maestrosdelweb.com/editorial/upphp/ <5> yeah, I was guessing it was someone else's tutorial. Forget you ever saw them. <5> They're badly outdated. <6> tin_nqn: Check PHP documentation, there's nothing you cannot find there. <7> while($type = mysql_fetch_array($result, MYSQL_NUM)) { echo '<option value="'.$type[0].'">'.$type[0].'</option>'; } is there something wrong with this ? <4> tin_nqn: your form has something like <input type="file" name="curriculum">.. to access the name of that file when they upload it you'll need $file_name = $_FILES['curriculum']['name']; <3> ok.. thanks <4> the actual file itself, which is placed in your temp directory, you can access with $_FILES['curriculum']['tmp_name'].. <5> AfroTurf: why not use mysql_fetch_row? and stick a newline on the end of that. <3> whats differents are between copy() and move_uploaded_file() ? <8> is there an easy way to remove quotes from a POST variable ? <4> I think move_uploaded_file might also check if the file was sent via _POST like is_uploaded_file does ?? <7> CryWolf: why not use mysql_fetch_array or mysql_fetch_***oc and just display what i want :) <6> digitalDude: Just remove them? <4> hrm, str_replace("\"", "", $string) might work... <5> AfroTurf: mysql_fetch_row($result) is the same as mysql_fetch_array($result, MYSQL_NUM) <8> tws what do you mean by just remove then? <7> crywolf: ya i know <7> crywolf: what actually happened is i forgot a quote somewhere and didn't see it right away <6> digitalDude: Just replace those double quotes with nothing, like cyphor mentioned above. You can do that when you're performing your input sanitation to user's input. <5> AfroTurf: asking "Is something wrong with this line" almost never works as intended. <7> crywolf: ya but you never know :) <8> thanks <7> hey cyphor wanna see an interesting use of implode? <7> cyphor: i did this instead of a loop one night. $sql = "INSERT INTO options (oid, vid, options) VALUES ('', '$vid', '" . implode("'), ('', '$vid', '", $options) . "')"; <3> yeah! I've uploaded my first file... <3> thanks everybody. <7> tin_nqn: you can change the filename when you upload too <7> tin_nqn: that way you can make sure you don't have duplicate files <7> but depends on your needs <9> how could I grab all the text after a question mark in a string? <9> i am sure regex would work...wondering if there is anything...nicer <10> preg_match("/\?.+/", $string);
<4> AfroTurf: sorry I was afk.. <7> cyphor: np <9> that returns a '1' Mangusta <0> substr($string, strpos($string, "?")+1); <4> yea, it's good to have the app name the files on it's own... can forget about iffy filenames being p***ed to =) <10> jiriki, preg_match("/\?.+/", $string, $matches); <10> $matches will contain the matches in the line <4> jiriki? heh <11> how do I get the number from a string like so string = 'CARMLS12312312.jpg' where I need the number between CARMLS & .jpg (or sometimes jpg is all caps JPG), I'm guessing I need a reg expr <0> jirwin even <12> Jay_Callicott: preg_match_all("/[/d]/"), $string, $matches) <12> Jay_Callicott: preg_match_all("/[\d]/"), $string, $matches) <12> even <11> what is matches <12> Jay_Callicott: array of matches <0> Jay_Callicott: that will give you an array of each individual digit i believe <0> Jay_Callicott: you may find preg_match("/(\d+)/", $string, $matches) more useful if digits only appear in one place in the file name - the number string will be in $matches[1] <12> Jay_Callicott: http://www.phpro.org/tutorials/Introduction-to-PHP-Regular-Expressions.html <11> thanks guys <0> Jay_Callicott: and read that page! <9> Thanks once again. <13> has anyone ever used php in conjunction with scp and an scp script? <14> how can i strip all whitespace froma string <15> JaredCE, maybe str_replace... <7> JaredCE: www.php.net/trim <0> JaredCE check out preg_replace using \s if you want to remove whitespace from the entire string <2> AfroTurf: only off the ends isn't it? <4> str_replace(" ", "", $string); <7> begging and end <14> yeah i need it in the entire string so "hello world" becomes "helloworld" <7> beginning* <2> Yeah that's what I meant. <4> JaredCE: see above <7> ya then str_replace <0> JaredCE do you need to remove all *whitespace* or all *spaces* <2> He asked "how can i strip all whitespace froma string" <7> ya <4> uh huh? <7> and i told him <7> :) <7> JaredCE: be more precise <2> I think JaredCE took off for a hike. <14> excellent, cheers guys <2> I hate when ppl ask questions and then don't stick around for the answer. <2> ahh <2> better <4> lol <2> =D <14> i was testing the code :( <7> JaredCE: trim($str) = whitespaces str_replace(" ", "", $str) = spaces <4> I've always considered a space a whitespace string, what is the difference AfroTurf? <0> JaredCE, AfroTurf trim won't work here; it only does the beginning and end of the string <7> cyphor: whitespace is spaces before and after your string :) <0> whitespace = tab, space, carriage return, etc. space = ascii 32 <14> yeah i know about tim <4> i c <16> Apr 13 12:26:14 Zeus kernel: Out of Memory: Killed process 8615 (php). <16> fark you. <0> Apr 13 12:27:11 ls fhdslkfd <0> ls: fhdslkfd: No such file or directory <0> error messages are awesome <16> you see <16> that php script was firing off 67,000 http queries <17> for backwards compatible, is right to avoid naming convention like file.inc.php <17> and replace that with file_inc.php or there is any problem <7> kioto: you can have file.inc and have your webserver to treat that as a .php file <2> mazzanet: aimed at which server? =D <0> mazzanet: trying to replace google? <16> no <16> microsoft mappoint actually <7> heh nice <16> geocoding a list of 67,000 addresses <16> except for some reason my kernel decided to be a bastard and kill the process <2> Hmmmm.... you serious?
Return to
#php or Go to some related
logs:
apt-get ncurses ubuntu sophossavi debian mysql can't add or update 1452 #oe php_mysql msjava HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device #debian ironroses #lisp #php
|
|