| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Comments:
<0> does anyone know how to convert system.datetime timestamps to unix timestamps? <1> sorahn: is it in a db? <0> no <0> it's actually a file name <0> and i'd like to use php to rename it yyyy_mm_dd_hh_mm_ss if possible <1> oh. i usually just do select *, UNIX_TIMESTAMP(date) as phpdate <0> erm... <0> the format of the timestamp i have is one used commenly by C# <1> oh, i guess i'm not familiar with that <0> looks like this <0> 01C682FDEB70E8E0 <2> NBrepresent - it's not getting executed by PHP for some reason <3> Anyone knows an opensource PHP script that works like this: http://www.newstopica.com/demo3/ ???? <2> even the page title is wrong <1> yeah <4> xavito... i've used http://magpierss.sourceforge.net/ to embed RSS feeds in my sites
<2> magpie is good stuff <3> Thanks JonnyRoller <5> im trying to build and to deal with an array of objects... can someone help me understand why this isnt working? http://pastebin.com/744615 <6> this example calls a php script to send .php file as a download "<a href="/pastebin.php?dl=744575" title="download file">download</a>", how can I do something similar? <7> Luckys: Read php.net/header <8> Luckys: and readfile() <8> firepol: your first row is a row in the array right? <5> aidan, exactly <8> why would adding that first row be different to adding the second? <8> firepol: and, where exactly do you think you are using objects? <8> $urls = array(); $url[] = array( ... ); $url[] = array( row2 ); <8> foreach ($urls as $url) { echo $url['title']; } <8> there are plenty of examples of this in the manual <9> can someone tell what's wrong with: private $mtest = "$"; <8> Nikerabbit: single quotes if you don't want it to be parsed <5> aidan, i tried also by specify as you did... it doesnt change anything <10> Nikerabbit: php4? <9> php5 <10> mkay... And what exaactly "doesn't work"? <9> why that is syntax error as cl*** member, but not otherwise <8> firepol: ... yes it does, if you're still gettign an error, pastebin your new code <9> Parse error: syntax error, unexpected '"' in languages/LanguageHe.php on line 39 <5> ok, i will do and paste <8> Nikerabbit: because you can't have a variable evaluated inside the cl*** parameter section <5> aidan, ok, i didnt change the "echo" (i was still considering it as object) thank you <9> aidan: mm logical, but does that justify showing very nonsense error message even when no variable evaluation would occur? <11> I've been asked to make a cl*** which includes some code so that it can be used in many diffrent apps. Do I only make a .php file, and put all the functions inside a cl*** foobarcl***{ code here } ? <8> Nikerabbit: variable evaluation DOES occur <5> aidan... well what is the benefit of using objects, then? i was trying to learn... but came back to "non objects" ... <8> firepol: there's no benefit in your example, there's no reason to use them <5> aidan, ok ;) then tank you <5> (as it works i wont complicate my life for nothing) <6> Dangermouse, header('Content-type: application/pdf'); , instead header('Content-type: application/php');? <6> works, thanks Dangermouse <12> how can I make php send a file to the user, instead of php viewing the file? <6> hehe, <13> apocs: header ('Content-Disposition: attach'); <13> but it's often a browser issue how to handle files <6> Apocs, header('Content-type: application/php'); header('Content-Disposition: attachment; filename="downloaded.php"'); readfile('original.php'); <12> Luckys: that will send the file to the user for him/her to save? <14> Hi there, If I want a form to do something different depending on which button I press, I ususlly include an if-else statement if(isset($_POST['submitButton1'])) do this else ..... do something else. Is there a better way? <1> i might have found a clue. if i do $pageTitle='test'; die($pageTitle); in opera, it shows up as 'test' , and in ie6, 'test', but in firefox, some questionmarks <1> anyone know what that's about?? <15> nbrepresent ... are you using <?php ?> or <? ?> <4> sonic... i usually give all my buttons the same name (e.g. <input name=command value=Submit>)... <4> and then check the value of $command... <4> six of one! <14> JonnyRoller: Thanks, isn't that the same as wahat I'm doing? <4> pretty much the same... <4> i've gotten used to just looking in one variable ($command) for the button that was pressed... <14> Cheers <14> aha <1> using ?php <4> don't have to worry about having a button name interfere with any other variables I might be using <14> i get you, thx <15> present are you sure... the script were execute properly? <15> was* <15> executed :) <15> <lol> <1> well, yes, because the test worked in opera and ie <1> so $pageTitle was definitely 'test'
<15> are you viewed source of page? <1> yes <16> well... i must say - compared to phpeclipse - zend is rock stable :| <15> hmm peculiar :) <2> NBrepresent - check your language setting in firefox? <2> Tools -> Options -> Advanced -> Languages button <1> everything checks out there <17> Hey, how can I forget command to get the first three letters of a word, what is it? <10> substr()? <18> substr() <19> substr() <19> that question made no sense... <20> Hi! i'm having a problem. I'm trying register a variable in a session. I made it: $_session["foo"] = "hello";(test.php) but when i run the page test2.php the variable is empty: echo $_session["foo"];(nothing is show). I tried then use the it: $foo = "hello"; session_register("foo"); it worked. i look on php.net and i see that the session_register function is deprecated: "// Use of session_register() is deprecated" <20> What is wrong ? <19> guevolt: $_SESSION <8> JonnyRoller: an even better solution, independent of the details of the form, is checking the request-method <20> itrebal: ? <10> guevolt: $_session != $_SESSION <8> JonnyRoller: if (strtolower($_SERVER['REQUEST_METHOD']) === 'post') { form was submitted } <20> yep. i use all in uppercase. i just wrote wrong. sorry <20> Wolfpaws: have idea? <10> guevolt: Which PHP? <15> guevolt are you using session_start(); on first and second page <20> pirat: first <15> you must use it on both <20> Wolfpaws: 4.x <10> 4.x is probably only one version, I ***ume <19> guevolt: to put a variable into the session you do session_start(); $_SESSION['key'] = 'value'; and then on another page, after doing session_start(); $_SESSION['key'] will be 'value' <21> "$" <20> Wolfpaws: 4.4.2-1 <12> I know how to make URLs like index.php?page=front - but how can i make urls like index.php?front? <19> Apocs: look into $_SEVER['QUERY_STRING'] <15> use & <12> itrebal: tnx <20> itrebal: worked. will i need use session_start() on all page? <19> guevolt: yes <20> hehe. **** it.. don`t have another solution ? <12> itrebal: is there any known downside, using this method? <10> session.autostrart in php.ini, but don't rely on that... <19> Apocs: not afaict, mind if i PM you? <12> itrebal: not at all <20> Wolfpaws: strange. my session.auto_start on php.ini is 1. <20> Wolfpaws: then probably i not need use session_start(). right ? <10> probably <20> Wolfpaws: humm.. true. i made a test now. just remove the session_start on second page and worked. <20> Wolfpaws: by default the session.auto_start is 0, right ? <10> guevolt: As said: Don't trly on that... In 99.732% of the servers that is off... <20> Wolfpaws: humm.. then is the problem. thanks. <20> this is the problem. sorry for my english. hehe <10> no panic... <6> hello Wolfpaws <10> yo <22> Hey - i have a question regarding email attachments, anyone's available to help? <10> !+g1 <23> Guideline #1) Don't ask to ask, Don't state: "I have a question", Don't ask: "Is anyone around?" or "Can anyone help?". Just Ask The Question <22> Gotcha <22> I made a form for users to submit a movie (>5mb) along with some user info. It then basically sends an email to whoeverand attaches the file the user has uploaded. It all works well, the file gets attached and all but i always end up with an invalid file. <19> Wolfpaws: and people already know you as Wolfpaws <10> itrebal: except for you :) <24> c0ldfusi0n: sending files over email is a bad idea <19> Wolfpaws: :) i have trouble with name-changes sometimes... i've been thinking of changing my nick <22> Well it's the most practical thing i can think of <22> http://pastebin.com/744722 <25> hello, anyone using db2 on linux with php? <22> With that code, the email attaches fine but the resulting attachment isn't valid <26> anybody knowledgeable about PDO ? <27> is there anything i can put into my scripts that'll help me look for memory leaks? <4> c0ldfusi0n: http://phpmailer.sourceforge.net/ is a great email library... and handles attachments very well <22> I don't really want a whole library for a single function =/ <26> I need select * from X where Col = 'Val' <26> should I write in the prepare : select * from X where Col = '?' or just ? <28> just ? <26> how does it know when to add quotes ?
Return to
#php or Go to some related
logs:
virtual bot irc #suse #oe #math siocsifflags non root permission denied zamba*meaning #perl kdelib-devel #perl #perl
|
|