Home Page   #javascript  #perl  #c  #openmoko  #php  #ruby-lang  #apache  #cisco  #java  #mysql   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#php

31 December 2007


Total 45 pages. You are browsing page 1/45.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Mon Dec 31 00:00:01 2007
00:00 <****> hi
00:00 <****> Xyphoid: oh, sure for birthdates DATE is perfect. :)
00:00 <****> Xyphoid : date is better?
00:01 <****> Hello everyone!
00:01 <****> mamep: well.. do you need to know at which time they were born?
00:01 <****> yeah
00:01 <****> of course
00:04 <****> I am new in web programming, so don`t curse me. :) I'm working with "includes" instead of using iframes for repeating some common parts of the design with other files (like menu, footer, header, etc).
00:04 <****> Both "include files" (source1.php and source2.php) are located at the root directory of the server: (/www/website).
00:04 <****> making the links be like http://mywebsite.com/maps/map1.php.
00:04 <****> should i use date or datetime?
00:04 <****> But, here`s the problem. When I includes both including files in a new directory into another directoy (like /www/website/foo/anotherdir/document.php) making the links like http://mywebsite.com/foo/maps/maps.php. How can I control these including files to work fine?
00:05 <****> mamep: dude... what do YOU need? the date or the date and the time?
00:07 <****> only the date
00:07 <****> there's your answer...
00:08 <****> given a $variable, how do i get its class name?
00:11 <****> hi, can someone tell me whats wrong with my regex : $str = preg_replace("`[^\000-\037]`", "", $str);
00:11 <****> it says " No ending delimiter '@'"
00:11 <****> erm i mean, "No ending delimiter '`'"
00:11 <****> hmm
00:12 <****> nvm my question
00:14 <****> though i have another question. suppose A.php calls a static method in B.php. anyway for the method in B.php to know that it was A.php that called it? without passing parameter
00:15 <****> rullie, you can look in the backtrace, but that's hacky
00:15 <****> _tagg: you are using ` as your delimiter?
00:15 <****> mm, ok thanks
00:15 <****> yes i think so
00:15 <****> _tagg: just to be safe use # as the delimiter
00:16 <****> ok i try
00:16 <****> i dont think ` is special otherwise there is something else wrong
00:16 <****> No ending delimiter '#'
00:16 <****> :/
00:17 <****> _tagg: you changed it to: "#[^\000-\037]#"
00:17 <****> yes
00:17 <****> $str = preg_replace("#[^\000-\037]#", "", $str);
00:17 <****> there is then a problem with the \
00:18 <****> try \\000-\\037
00:18 <****> ok
00:19 <****> hey it seems to work :)
00:19 <****> have to make some test, but seems ok :))
00:20 <****> [***note in logs: missing data because I had to reformat; some data may be irssi logs***]
00:21 <****> comperr: why do you need to tell us that?
00:21 <****> zircu, sorry - its a note to myself
00:30 <****> Hello people. Has anyone had any problems with PHP 5.1.2, GD 2 and the imagerotate "function" ?
00:31 <****> Oh, and I am using Apache 2.
00:35 <****> martyn: yes, you need the *bundled* version of the GD Graphics Library for such functions as ImageRotate
00:36 <****> anyone in here pretty good with photoshop? or know of a photoshop channel on here?
00:37 <****> mxweas: perhaps some help from #web
00:37 <****> ah
00:37 <****> k
00:37 <****> thx
00:37 <****> is there an elegant way of finding out if you are at the end of an array (assoc) inside a loop?
00:38 <****> find the length of it.
00:38 <****> or, use foreach
00:38 <****> carrier - Thanks for response. I am trying to modify a captcha image and the only way I can get it to draw is to comment out the imagerotate line. By bundled version, do you mean the one from libgd.org (formerly on boutell do com)?
00:38 <****> I am using Ubuntu so tend to use their repos. where possible...
00:38 <****> ThinkMedical: current()
00:38 <****> ThinkMedical: Use count to get the number of entries in the array for a for loop
00:38 <****> ThinkMedical: how are you looping?
00:38 <****> current() is wrong, so is count()
00:38 <****> foreach zircu
00:39 <****> ThinkMedical: oh you mean then the last item in the array?
00:39 <****> i guess youll just suggest a different type of loop? i was hoping for something neater
00:39 <****> ThinkMedical: you are looping and you want to know if this is the last item or not?
00:39 <****> no, that's end(); i mean finding out if the pointer is at the last element
00:40 <****> ThinkMedical: if the arrayitem in returned by current() doesn't equal your first one in the array, you're probably lopping through it..
00:40 <****> ThinkMedical: well, then compare it to the last element
00:40 <****> youve misunderstood the problem carrierBag
00:40 <****> ok
00:40 <****> sorry
00:41 <****> ThinkMedical: do you need to do something special for the last item in the array
00:41 <****> $v) {} i want to know when $v represents the last element
00:41 <****> ThinkMedical: there are different ways to do this
00:41 <****> what do i have to do to avoid null forms on my forms? :(
00:42 <****> i know and ive probably done them all, i was hoping there would be some cute little function zircu
00:42 <****> but there doesnt appear to be, and ive never heard of one
00:42 <****> one way is to array_pop() to something like $last_element, and processes everything as normal and after the loop you process $last_element as you want
00:42 <****> i could array_pop()
00:43 <****> yes i was thinking that
00:43 <****> ah well, i didnt think there would be some hidden little function i'd not heard of, but worth checking
00:43 <****> ThinkMedical: just increment foreach and see if this value equals the total amount of array-items.. it doesn't get any simpler
00:43 <****> it all depends on what difference you need to happen on the last element
00:44 <****> foreach isnt really the right type of loop if your incrementing variables to keep up with it carrierBag
00:44 <****> array_pop will do fine zircu, it was what i was going to do anyway
00:44 <****> why not? you can't use a for-loop unless you don't use assoc. arrays
00:45 <****> incrementing a value at each step in a foreach loop is perfectly fine
00:45 <****> the other method is $count = count($array); for($i=0; $i < $count; $i++); but that only works if the keys are all numeric and in order
00:46 <****> which is only syntactical sugar for a foreach loop (or is it the other way around? hehe)
00:46 <****> carrierBag: no
00:47 <****> no?
00:48 <****> foreach and for loops are two differnt things
00:49 <****> what i am suggesting is a way to get to the last item outside the loop
00:49 <****> hey peeps is it possible to output to a log file easily when debugging?
00:49 <****> since foreach is very combersome if you do not have keys numeric and in order (or un defined)
00:50 <****> for()
00:50 <****> zircu: well sure, but we haven't been told, if he uses assoc. arrays or not..
00:51 <****> "is there an elegant way of finding out if you are at the end of an array (assoc) inside a loop?" ... yes assoc.
00:51 <****> i think the only two solutions would be initiate a counter in the loop that tells the code to break from logic or.. as i suggest array_pop() that data to be used after the loop is done
00:51 <****> i think he has a good understanding on what he wants to do, he was looking for an easier way
00:52 <****> is my question a stupid one about the debugging? I know in rails I could just send things to a logger function. Its much easier than using echos etc


Total 45 pages. You are browsing page 1/45.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo