[PHP] Re: Nevermind I figured it out
David, There is a better way to do through a similar operator. $variable = "hello and welcome"; $variable .= " to www.newimagedesign.com"; therefore... print ($variable); would result in... hello and welcome to www.newimagedesign.com hope this helps. -Jordan K. Martin New Image Design - "David Johansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I just user $message = $message . "Some text"; > But is there a "better" way to do this with something like the += operator? > Dave > > "David Johansen" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I was just wondering if there was a way to add new text to the end of > > strings. I tried doing > > $message += "Some text here"; > > but that just set $message to 0. I'm sure it's something simple but I > > couldn't find anything on it in the documentation. > > Dave > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file_exists problems
I had a script that was running beautiful that simply called up a database and displayed the results in tables. I went to add images to this script and all hell broke loose. This is the portion of the script that I added: -- //filename is the item number + t.jpg -- t shorthand for thumbnail $itemnumber = "$myrow[item_number]"; $filename = "$itemnumber t.jpg"; echo ""; //if the file exists then print it. Otherwise print a generic image saying it doesn't exist. if(file_exists(/images/$filename)) { readfile(/images/$filename); } else { readfile(images/npat.jpg); } - Is there anything I need to know about "file_exists" that I'm not doing. for some reason when this code is added it gives me an error on the line after the close of the else statement. That line was perfectly fine before the addition. Please help. -Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] file_exists problems
I've since tried that also. It too seems to return the same error. I'm curious if the file_exists can't use relative positionslike it has to be in the same folder or you have to use the whole line like c:\ I'm working on a box that isn't mine of the net...if that's the case I don't know my full directory line. Just a thought but I'm not sure. I'll include my full code below...as it sits now. Maybe you can see something that I can't. - \n"; echo "ImageInfo\n"; do { //filename is the item number + t.jpg -- t shorthand for thumbnail $picname = "$itemnumber t.jpg"; print (""); //if the file exists then print it. Otherwise print a generic image saying it doesn't exist. if (file_exists ("/images/$picname t.jpt") { print (''); print (" $dn $sp - $val $size : \$$priceRelease: $release Preorder This Item\n"); } else { print (""); print (" $dn $sp - $val $size : \$$priceRelease: $release Preorder This Item\n"); } } while ($myrow = mysql_fetch_array($result)); print ("\n)"; //if no results found display this message } else { echo "Sorry, no records were found!"; } $dn = "$myrow["driver_name"]"; $sp = "$myrow["sponsor"]"; $val = "$myrow["value"]"; $size = "$myrow["size"]"; $price = "$myrow["price"]"; $release = "$myrow["release"]"; $itemnumber = "$myrow[item_number]"; ?> - maybe that will help. -Jordan "Faeton" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello Prolog, > > > Hm... And what about: > print ''; > instead of readfile? > > > P> if(file_exists(/images/$filename)) > P> { > P> readfile(/images/$filename); > P> } > P> else > P> { > P> readfile(images/npat.jpg); > P> } > > > > > Ivan 'Faeton aka xetrix' Danishevsky > ICQ(240266) [EMAIL PROTECTED] www.xemichat.com > ::: Ñòîèò òîëüêî çàîñòðèòü âîïðîñ, êàê ñðàçó ïðîñÿò çàêðóãëÿòüñÿ. ::: > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] cross server sessions????
hello all, Two questions 1) Is it possible to pass a session to another server? I'm creating a secure order form for a shopping cart but the ssl service of my provider is on a different server. Is there anyway to carry a users session over to this box? 2) If it is not possible to carry a session...is there anyway I could include this page on the ssl server into my main server from my host? If I could do an include I could continue the session and use it's stored variables. Thank you for the help. -Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]