| |
| |
| |
|
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 29 30 31 32
Comments:
<0> function <0> sorry im a noob <0> :) im learning thow <0> hehe ;) <1> file_get_contents('http://cyruxnet.org/news.htm'); preg_match('/<td style="height: 26px;" width="87%"> <1> <span cl***="titular">([^<]*)<\\/span><\\/td><\\/tr>/',$html, $he); <1> echo $he[1]; <1> like that? <2> tias <3> DuNkE|VoLk, try it. <1> it prints --> Anything <1> xD <2> and please avoid pasting stuff like that <1> ok ok sorry <1> but i want to know how is it <0> I'm just gonna have every folder named with the userid
<0> hmm <0> can't i enter variables inside of the functions($variable) <4> DuNkE|VoLk: you might need to escape the < and > characters too.., also you gotta be quite strict to place the proper \r\n or \n stuff in too. <0> like mkdir($target_path = "images/"); <1> lietu <1> can i have an example? <4> DuNkE|VoLk: well anyways, if you didn't get it working already, join #regex, they help with regex, we help with general php, also, stop pasting them damn 4-line things here, use pastebin <5> anyone know the word for 'Tax' (as in, that you pay on top of an items purchase price) in any language but english? :) <4> vero <- finnish ;) <6> Davey imposto ;) <7> I have a cl***, how can I access functions I have defined (outside the cl***)? <6> rixth $obj = new FooCl***(); $obj->function_name(); <8> can anyone think of a good filename friendly character to sensor bad words with instead of * like sh*t? <7> Toke, -? <7> xshad, no no, I have a cl*** (with an object instantiated) but I would like to access functions within my methods that are not defined within the cl*** its self. <8> these filenames will already have alot of -'s so it might get confusing <6> Toke . <2> Toke: ! or ? <7> xshad, function foo(); cl*** barCl*** { function callFoo() { ?????? } } kinda like that. What goes where the ??? are <8> ? isnt allowed <8> but i think ! will work <9> Toke: #%&/ is kinda popular in comics :p <6> rixth just call it as is... function callFoo() { foo(); } <7> Oh cool, ok thanks <6> maybe you mean overloading ? <6> <6> rixth http://www.php.net/manual/en/language.oop5.overloading.php look for __call <5> that is not what rixth wants <5> herm, xshad <5> I'm confused :( <6> me too ;) <2> i wasn't till you said something <6> lol <0> hmm <0> trying to use the mkdir function <0> mkdir("/$_SESSION['ID']\"); now if i used this function would it make a new direction with the session id? <6> you'll get a fatal error <2> Toke: hmm.. that look like a parse error <2> err tdd1984 ^ <0> yea <0> zircu: well i want to make directory with the folder % <0> folder userid number <6> mkdir($_SESSION['ID']); <2> well, have you ensured that there is something in $_SESSION['ID']? <0> yes <0> this page has a session started <2> if there is make sure that the directory doesn't exist <0> k <0> well how could it when the session id is the user id? <0> inless they came back it will overwrite the dir? <10> I have a range of numbers ex: 584-5998 I want to extract the odd/even numbers.. first of all How can I loop arround the entire range? <0> mkdir(/$_SESSION['ID']); <0> thats it <10> or rephrasing, how can I foreach each number inside a range if this is possible? <11> hrm <11> using stream_select for example, would a "stream" be considered the pointer to a pfsockopen? :) <0> ohh <0> zircu: i see what your saying now <12> ephasus: either the for statement, or foreach(range(584,5998) as $key) if you want to use foreach <12> however, that's ugly since it stores an array of values for no real reason <0> Warning: mkdir(34): File exists in /home/content/b/a/r/barbhaynes/html/database/form.php on line 24
<0> i get that its saying that the directory 34 already exist correct? <2> epaphus: something like foreach(preg_split('//', $str) as $c) if(is_digit($c)) { ... } <2> rather ctype_digit() <2> oh, you want a range.. i misread it <10> Xyphoid: i need the array of values.. thats perfect thanks <13> epaphus: for ( $i = 584; $i < 5998; $i++) { do **** } ? <2> a for($i=584; $i <= 5998; $i++); <10> jpeg: yup.. another way <2> pending if the range is inclusive or not <11> hrmm <11> ugh this is hell <11> http://php.pastebin.com/709958 <14> tdd1984: you have to do mkdir('34') i think <11> im getting an error, line 48, saying only vars can be p***ed by reference <11> anyone familiar w/ streams who has any idea? <14> if its a variable, do $var = (string) $var; <11> its a stream file pointer :s <2> zinor: do it like the example on php.net/stream_select <11> the example doesnt show how to actually create the streams <15> what are pointers? <6> zinor you must provide variables as second and third parameters <11> oh so like <11> $blah = null? <6> yes, and stream_select($var, $foo, $bar, 10); <2> zinor: yeah, you can't specify constants as params if the data may be changed <11> ah thx <11> silly to be honest :) <16> could i ask a big favour? could someone please comment the section that I have highlighted in my pastebin so I can have a better idea of what's going on on those lines? it's at http://perry.pastebin.com/709962 . <0> $target_path = "/$_SESSION['ID']/images/"; now can't i put this in after my mkdir($_session id functions? <2> yes <0> hmm thats what i thought but i get a error <2> well mabey <2> pastebin what you have <0> k <0> i don't think the directory is getting created fast enough on the server <14> NBrepresent: wow, that thing has officially the most useless peice of code on earth. <16> well, i was told there are more efficient ways to make a calendar, but i've used this script before on another site, so I had an idea where I should start when I wanted to start customizing it a little bit. <0> http://pastebin.com/709969 <0> zircu: there you go <16> Gimp_: is that what you meant? <14> NBrepresent: no, i meant that little if statement on $row['time']. why not just do $time = $row['time']; <16> haha. <16> yeah, why not? <14> the if statement is completly pointless, as thats what its accomplishing in the end... <2> tdd1984: i would ***ign $target_path = $_SESSION['ID']; then use $target_path to mkdir() with, then later $target_path .= '/' . basename(...); <0> k hold on <17> Hi! do you know where i can find some work as freelance ? <2> tdd1984: also you might want to sanitize that uploaded[name] <14> guevolt: not here. <0> k <0> sanitze? <17> Gimp_: heheeh; <2> tdd1984: only allow the chars you want to be used as a filename <0> k <2> tdd1984: the filename could potentially have very odd characters.. like a \n even <17> someone that have a php certificate ? <6> !tell guevolt about jobs <0> zircu: use the varialbes in that order? <2> tdd1984: i suggest setting target_path and use it to mkdir it avoids stupid typos and keeps the data all in one place <2> then after you mkdir() concat the '/' . basename() stuff <2> if I were you i would put the userid dirs in another subdirectory <0> $target_path = mkdir($_SESSION['ID']); <0> are you saying do that? <2> no <0> k <0> i didn't think so <2> $target_path = $_SESSION['ID']; mkdir($target_path); $target_path .= '/' . basename(...); <0> i see <0> good ideal <0> :) <2> of course :) <6> $dir = "users/{$_SESSION['ID']}"; if (!is_dir($dir)) mkdir($dir); <0> brilliant <2> yeah.. do what xshad did too
Return to
#php or Go to some related
logs:
debian resolvconf leave resolv.conf alone #debian #web #linux jailshell tail why
#math #math install x11 ubuntu #linux #php
|
|