#php
28 October 2007
Total 51 pages. You are browsing page 1/51.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Sun Oct 28 00:00:54 2007
00:01 <****> hey, please don't ignore me
00:01 <****> erisco: $foo is a handle (object) to get at the innards of foo.php? You uses classes for namespaces?
00:01 <****> PerlJam, you can even introspect into the import to see what variables/functions/classes are in it
00:01 <****> s/uses/used/
00:01 <****> if i'm using cli PHP how would i open a new terminal to do a system() command?
00:01 <****> PerlJam, the Import class is populated with the information from the file you specify
00:02 <****> eth01: assuming w is in the path and if you correct your string to use $cmd instead of just cmd.
00:03 <****> PerlJam, due to many restrictions in PHP with metaprogamming it was necessary to generate import cache files... but it enables the ability to have the same function and class names
00:03 <****> PerlJam, and the cache files are handled automatically... and updated automatically
00:04 <****> the middle name is optional and the created usernanme will look like First_Mid_Lastname or First_Lastname. So when middle name is left blank its just an underscore, so first_last is made fine. But if it is filled in I get FirstMid_Lastname .. If i put another underscore when you dont fill it iin it will have two underscores. Is therea better way to do this? or anyone else who can help me?
00:04 <****> PerlJam, I do have a version which makes smaller cache files (for performance reasons) but cannot allow same function/class names
00:05 <****> gentoodude: $str=$first; if(!empty($mid)){ $str.="_".$mid; } $str.="_".$last;
00:05 <****> gentoodude: that way it's only appended if theirs $mid
00:07 <****> PerlJam, wadda ya think?
00:07 <****> PerlJam, want me to upload examples?
00:07 <****> oooooo
00:07 <****> erisco: It sounds cool. But ... why didn't you do this ages ago? ;)
00:07 <****> PerlJam, I didn't really think of it ages ago
00:08 <****> PerlJam, want to see examples?
00:08 <****> erisco: sure
00:09 <****> if $blah is an array (3 items), can I assign those values to $var1 - $var3 with "list ($var1, $var2, $var3) = $blah;" ?
00:09 <****> Minnozz: yep
00:09 <****> when I do file_get_contents on a audio file
00:09 <****> ok weird, then something else is buggy...
00:09 <****> it only gets 40kb of the file
00:10 <****> RockerMONO: is that gonna make an underrscore before and after the Middlename
00:10 <****> when i include a file .. is "../" not the prefix to go 1 level down ?
00:10 <****> A_Enchanter_00: yes
00:10 <****> hmm
00:11 <****> ok i must miss spell something then
00:11 <****> gentoodude: ok, it has $first, then it adds "_" and $mid to it if $mid is set, otherwise it adds nothing, then it adds "_" and $end
00:11 <****> A_Enchanter_00: Although it is better to have a BASEPATH defined so you can use it to include files. :)
00:11 <****> A_Enchanter_00: one lever _UP_ you meant, right?
00:12 <****> anybody know why?
00:12 <****> foutrelis: maybe his directory trees are upside down
00:13 <****> PerlJam: haha :]
00:13 <****> RockerMONO: where to i put it in regards to my script: http://www.nomorepasting.com/getpaste.php?pasteid=5640
00:14 <****> Jamiee1: Pastebin your code please. pastebin.ca
00:14 <****> when I do file_get_contents on a audio file it only gives me 40kb of the file
00:14 <****> okay
00:14 <****> Jamiee1: on any audio file or a specific one?
00:14 <****> uhmm
00:14 <****> Jamiee1: is it alwasy 40kb or does the size vary?
00:15 <****> alway 40kb
00:15 <****> i'll just post my code
00:15 <****> gentoodude: just change $midu = $mid . '_'; to if(!empty($mid)){ $midu = $mid . '_'; } else { $midu=""; }
00:15 <****> :D
00:15 <****> foutrelis: hmm ok yes up might be right like from /foo/baa/fuu .... if i use ../ it would bring me to /foo/baa/ and ../../ would bring me to foo correct ?
00:15 <****> when I have $array = array ($_POST['blah1'], $_POST['blah1']); and $_POST['blah2'] is empty, will $array[0] be empty or the value of $_POST['blah2'] ?
00:15 <****> err.
00:15 <****> A_Enchanter_00: No.
00:16 <****> when I have $array = array ($_POST['blah1'], $_POST['blah2']); and $_POST['blah1'] is empty, will $array[0] be empty or the value of $_POST['blah2'] ?
00:16 <****> A_Enchanter_00: You are in /foo/baa/ so ../ will get you to /foo/
00:16 <****> A_Enchanter_00: Nevermind me. You were correct -.-
00:16 <****> lol
00:16 <****> :(
00:16 <****> Minnozz: The obvious answer is usually the correct one.
00:16 <****> foutrelis http://pastebin.ca/751975
00:16 <****> hey guys, I need a way to store time. Does PHP have like a unix Epoch time function?
00:16 <****> foutrelis: i should have added a / after fuu
00:17 <****> Sirisian: yes
00:17 <****> PerlJam: but I'm pretty new to php so things aren't very obvious to me
00:17 <****> PerlJam, I need a keyword, what's it called
00:17 <****> foutrelis: when i tryed to explain hhe
00:17 <****> Sirisian: time
00:17 <****> oh that is it? thanks
00:17 <****> Sirisian: php.net has a search facility you know :)
00:17 <****> i will use JPATH_BASE insted
00:18 <****> this s/msg nickserv identify 420420
00:18 <****> PerlJam, yeah I'm on it
00:18 <****> http://us3.php.net/time
00:18 <****> i have my directory set to 0777 but fwrite seems to fail, is there anythin i have missed?
00:18 <****> kippi: perhaps you want it to be 2777 instead
00:18 <****> PerlJam, http://pastebin.ca/751980
00:19 <****> PerlJam, tell me what you think of that
00:19 <****> PerlJam, what value would be the best in a sql db to hold unix time?
00:19 <****> PerlJam: nope
00:19 <****> could it be the chown?
00:19 <****> Sirisian: int?
00:19 <****> okay
00:20 <****> wait.. how many bytes is a mysql int?
00:20 <****> 'something' in this code sets my variables, so I get an empty mysql-query: http://pastebin.com/d2454e601
00:20 <****> Sirisian: Since a unix timestamp is an integer :]
00:20 <****> but I don't know what it is
00:20 <****> foutrelis the audio files is the second file in the loop
00:20 <****> any idea?
00:21 <****> Sirisian: mysql does have a datetime data type
00:22 <****> PerlJam, surely you are at least a bit impressed by that functionality
00:22 <****> PerlJam, int is good, I figure it's 4 bytes
00:22 <****> erisco: more so if I saw the implementation :)
00:22 <****> PerlJam, you mean the actual code?
00:23 <****> PerlJam, it is a single file, and additionally it needs a single directory that it can write to
00:23 <****> IP's are stored as varchar is set as 15 length?
00:24 <****> Hey guys, is there a way to get OS colour information through a browser?
00:24 <****> PerlJam, you just include the file into your application. You set its directory it can write to with Import::$cache_dir = 'cache/dir/';
00:24 <****> Crashed: what color is linux?
00:24 <****> Sirisian: Yes. But you can also store them as ints. php.net/ip2long
00:24 <****> PerlJam, and away you can go :)
00:24 <****> What's wrong with this code? It always executes the first block, even if there are no post data; http://pastebin.com/d2454e601
Total 51 pages. You are browsing page 1/51.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
