[PHP] Business objects functionality in PHP

2002-01-16 Thread Chris Boget
Has anyone written (or know of something) that works similar to business objects that is written in PHP? Chris -- 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,

[PHP] Business objects functionality in PHP

2002-01-17 Thread Chris Boget
Has anyone written (or know of something) that works similar to business objects that is written in PHP? Chris -- 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,

[PHP] What is going on here? list() = each()

2002-01-23 Thread Chris Boget
? $var = this.that; list( $thisVal, $thatVal ) = each( explode( ., $var )); echo $thisVal, $thatVal ? What is getting echo'd out is: 0, this Why? What am I missing here? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] What is going on here? list() = each()

2002-01-23 Thread Chris Boget
change to: ? $var = this.that; list( $thisVal, $thatVal ) = explode( ., $var ); echo $thisVal, $thatVal ? Silly me. Chris -all embarrassed now... :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] Write an array to a file

2002-01-29 Thread Chris Boget
How do I write an array to a file? For example, I need to write just this in a file: ?php $Company = array(Item 1, Item 2, Item 3, Item 4, Item 5,); ? I've been hung up for 2 days on this. Any help would be appreciated. Use serialize prior to writing the data to the file and unserialize

[PHP] Oddity

2002-02-04 Thread Chris Boget
Ok, could someone tell me why this isn't working? (note, I took out all my error checks. This is just the relevant code... $query = Query that does return row(s); $result = mysql( $dbname, $query ); $macroDataArray = mysql_fetch_array( $result ); for( reset( $macroDataArray ); $elementKey =

Re: [PHP] Oddity

2002-02-04 Thread Chris Boget
$macroDataArray = mysql_fetch_array( $result ); I'm still curious what is going wrong, but I've found a work arround. One of the things I love about PHP is that you learn something new just about every day. Instead of fetch_array(), I can use fetch_assoc() and it'll do just what I need. :)

[PHP] Re: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Chris Boget
how would I write it if I wanted to say this: if $variable == 2 through 4 ??? if(( $variable = 2 ) ( $variable = 4 )) { echo Equals 2 through 4br\n; } Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help with PHP global array

2002-02-07 Thread Chris Boget
All variables in PHP are local to the scope in which it is defined. You cannot declare a variable as global (as such). To use a global variable: This is true. But I believe that the original question was actually the other way around... Make a local variable into a global one. The way to do

[PHP] get_browser();

2002-02-18 Thread Chris Boget
The following example that is in the onsite documentation: ? function list_array ($array) { while (list ($key, $value) = each ($array)) { $str .= b$key:/b $valuebr\n; } return $str; } echo $HTTP_USER_AGENThr\n; $browser = get_browser(); echo list_array ((array) $browser); ?

[PHP] Is it possible to...

2002-02-19 Thread Chris Boget
Given the following code: script language=php function function1() { global $bob; echo Bob = $bob\n; } function function2() { $GLOBALS[bob] = Joe Bob Briggs; function1(); } function2(); /script function1() can echo out the value of $bob

[PHP] argv and argc

2002-02-19 Thread Chris Boget
The other day, I was reading the docs and I just happened across something that emulated argc and argv. However, I just spent 2 hours in the docs and can't find it. Is there something in PHP that you can use to get this info? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] argv and argc

2002-02-19 Thread Chris Boget
look in the manual under predefined variables: language.variables.predefined.html Sorry, I should have specified for a function, not a script. I found those vars, just couldn't find the same for a function. Just found it, though: func_num_args(); func_get_arg(); :) Chris -- PHP General

Re: [PHP] Retaining data across multiple sites

2002-02-20 Thread Chris Boget
I want to retain some data across my sites, which have different domain names. I can't use cookies because they rely on the domain name, and I'd rather not pass the information on every link Any suggestions? Need to store it server side somehow. Perhaps a global database? Chris -- PHP

Re: [PHP] Retaining data across multiple sites

2002-02-20 Thread Chris Boget
I could do that, but how would I keep track of the users? I don't think IP addresses are reliable. I would also prefer to limit my database access. Are you using sessions? If so, you can keep track of users that way. I believe this would be the only solution available to you. I am not sure

[PHP] Class question

2002-02-20 Thread Chris Boget
I'm still kind of new when it comes to dealing with classes. I'm curious, is it accepted practice for member functions of your class to: * access global variables * use non member, user defined functions Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Next and Preview Row

2002-02-22 Thread Chris Boget
How do I find out a next and preview row values by using PHP and MYSQL. For examples, Take a look at the function mysql_result(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Next and Preview Row

2002-02-22 Thread Chris Boget
The solution I have been using is to do three queries similar to the below SELECT * FROM table WHERE field='ID00025' SELECT * FROM table WHERE field'ID00025' ORDER BY field DESC LIMIT 0,1 SELECT * FROM table WHERE field'ID00025' ORDER BY field ASC LIMIT 0,1 If you whish more row returned

Re: [PHP] Next and Preview Row

2002-02-22 Thread Chris Boget
It seems worst to me because in your case mysql has to retrieve all the rows. If it's a table with 1 million records or more, this should hurt ;) As I said, it was pseudo code. Now, imagine that you were just getting the records for a particular user? a particular application? Where there

[PHP] Form element names as array

2002-03-04 Thread Chris Boget
I know you can set up some form elements as array names so that when the form is submitted, you can access the values of those form elements, you can iterate through the array. So you can set up a bunch of form elements with the name form_elements[] and then when the form is submitted, you can

Re: [PHP] Perl and PHP

2002-03-06 Thread Chris Boget
I need to pass a variable to Perl from a PHP script. I am somewhat know PHP but I do NOT know perlI am running my perl script off of the command line. I tried /path/to/somewhere/script.pl?var=var but it did not work. I would love any help you could provide me it would be

Re: [PHP] 5 Records per line

2002-03-11 Thread Chris Boget
Basically what i want is, that on a results page, i want that the records You mean fields should be placed only 5 on one line. For example, let's say i have 100 usernames in a table in my database. Now on one page, i want to display all these usernames. But i want that in one line,

Re: [PHP] Targetted redirection?

2002-03-15 Thread Chris Boget
?php # Turning this on will jump this page out of the frames. # header('Window-target: _top'); ? Can you use this only for the predefined variables? _top, _parent, etc? Because it isn't working for me. Perhaps I am misunderstanding something. Here are my sample files: index.php

Re: [PHP] Targetted redirection?

2002-03-15 Thread Chris Boget
script language=php if( isset( $submit )) { header( Window-target: content ); header( location: right.php ); exit(); } /script The script needs to be in between ?php and ? in order to execute on your server. Browsers don't execute PHP. What you've written is how

Re: [PHP] Targetted redirection?

2002-03-15 Thread Chris Boget
Here's a nice link to Netscape.com describing the basics of frames: http://www.netscape.com/eng/mozilla/2.0/relnotes/demo/target.html Ok, I'll have to check it out. For your particular question though I would consider targeting the action of the FROM tag: FORM ACTION=top.php

[PHP] HTML (to XML?) to PDF

2002-03-19 Thread Chris Boget
Here is my situation: I've got HTML Templates that I'm using to parse and presents the end result to the user. Here is my dilemma: I need to take what is presented to the user (ie, the data less the HTML tags but maintaining the formatting) and turn it into a PDF file. I know I can use PDFLib

Re: [PHP] HTML (to XML?) to PDF

2002-03-20 Thread Chris Boget
Hm. If you can't store the data as XML from the beginning (doesn't it make more sense to go from XML to HTML than vice versa?), Yes, it does. However, the people creating these templates don't know XML, only HTML. As such, that is how they are going to be stored. :| If your initial

Re: [PHP] HTML (to XML?) to PDF

2002-03-20 Thread Chris Boget
I need to take what is presented to the user (ie, the data less the HTML tags but maintaining the formatting) and turn it into a PDF file. I found the solution with HTMLDoc (http://www.easysw.com/htmldoc/) It was very easy to set up and use. I heartily recommend it for anyone who has the

[PHP] session_start() and headers

2002-03-21 Thread Chris Boget
Are there any headers sent to the browser in session_start()? I ask because I have a script that sends data as a PDF document to the browser. Before I'm outputting the data, I'm sending the header: header( Content-Type: application/pdf ); to tell the browser that it's a PDF and to load as

[PHP] list(), each()

2002-03-25 Thread Chris Boget
Ok, I've got to be doing something wrong here. I've been beating my head up against the wall for some time and I just cannot figure out what it is. Before I say it's a bug with list(), could someone tell me what I'm doing wrong? ? $policy = 1016726726--1--1016643856; // problematic list(

Re: [PHP] list(), each()

2002-03-25 Thread Chris Boget
Why do you put each(explode()) ? Just list() = explode() is what you want. I did that because I thought they were complimentary functions? Just about every example I've seen of list() uses each(). Just using explode() makes it work. Obviously I'm going to have to go back and read more

Re: [PHP] strip spaces from inside string

2002-03-26 Thread Chris Boget
Say I have a string xyz abc def and I want to remove all of the spaces withing the string to create a new one. What's the best way? ? $string = xyz abc def; $stringWithOutSpaces = implode( , explode( , $string )); ? Or you can use eregi_replace(), but I don't know what the regex would

Re: [PHP] Source Code for the CNN Grabber

2002-03-28 Thread Chris Boget
This is the source, which is to advanced for me to debug!!! Waiting on their responce and maybe they can help me.Anybody have any clues Perhaps if you told us what was going wrong? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How is code in PHP interpreted, from 1st line to last? i dont think so

2002-03-28 Thread Chris Boget
How can I say php to execute graf.php until it´s finished and then move on to the rest of the code? echo img src='graf.php; ... more code ... echo img src='; include( graf.php ); echo ; Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] checkbox doesn't pass?

2002-04-04 Thread Chris Boget
But IF I still want to use $HTTP_POST_VARS, what then? What about the warning when checkbox is not checked? I use empty() to check the for the existence of checkbox variables. You can also use isset(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Making sure a post request came from your site

2002-04-05 Thread Chris Boget
For security, you can modify your code so that you check the $_POST elements instead of using the magic globals. That's all well and good. However, someone copy and save your HTML to their local machine, change some values, change the Action page of the form to be

Re: [PHP] Making sure a post request came from your site

2002-04-05 Thread Chris Boget
Is there any way to determine from where the post request came from w/o using http_referer? No, nor with it. I know that http_referer is unviable, that's why I asked if you can find out that data w/o using it. Someone who wants to mess with you can supply any HTTP referer they want to

[PHP] array_walk

2002-06-06 Thread Chris Boget
If you use array_walk with an associative array, the only arguments that PHP automatically passes to the defined array are the numerical/element keys. Is there any way you can force it to pass the associative keys? For example, I have an array: $bob = array( this = other ); Instead of passing

[PHP] Arrays: Please help before I go insane?

2002-06-06 Thread Chris Boget
To see what I'm working with, go here: http://www.melancholy.org/test_tree.php You may want to copy the source and the (mySQL) db structure and set it up on your system there to test it out. Though, if you don't want to do that, I show the output at the very bottom of the page. One note: I

Re: [PHP] Arrays: Please help before I go insane?

2002-06-06 Thread Chris Boget
Now, what I'm trying to do is build a tree based on the data in the DB. It's working relatively ok if I uncomment the code that is on line 48 and comment out line 49. However, what I really want to do is build a fully associative array doing this and now** an array that has string keys

Re: [PHP] Arrays: Please help before I go insane?

2002-06-06 Thread Chris Boget
Try: $ary[this] = array(that = 1); That works great until this has 2 children. The second child overwrites the first. :( Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Possible bug? (was Re: [PHP] Arrays: Please help before I go insane?)

2002-06-06 Thread Chris Boget
In that case, split it up into two-steps, to only init the array if you need to i'm not really sure how the rest of your code is -- you could probably do this a nicer way, but this will work: if (!is_array($ary[this])) $ary[this] = array(); $ary[this][that] = 1; This is all well and

[PHP] array_reverse() recursive

2002-06-10 Thread Chris Boget
Does anyone have or know of a function that will take an array and do array_reverse() recursively? I have the following array/structure: Array ( [0] = Array ( [0] = Array ( [0] = bob ) ) [1] = Array

Re: [PHP] form post

2002-06-12 Thread Chris Boget
There's no way to for PHP to say Yo, let's ride... submit that form Client-side manipulations must be done client-side, with javascript or something similar. But you can use a function/library called PostToHost() (or something like that). Search on phpbuilder.com for it. This issue has

Re: [PHP] Passing URL as variable

2002-06-20 Thread Chris Boget
The problem is that since the link itself has variables being passed, action is being passed as a separate variable and the full link is getting cut off. I tried using htmlspecialchars, and surrounding the link with quotes, but nothing worked. You can try urlencode(). The problem with

Re: [PHP] Passing URL as variable

2002-06-20 Thread Chris Boget
Most links being passed to clickrate do not have this particular problem. Is it a problem if I pass all URL through urldecode, for those cases when I need it, i.e. will it mess up a URL that hasn't been encoded with urlencode? Run a little test script to see for yourself, but I don't

[PHP] Re: [PHP-WIN] RE: [PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-21 Thread Chris Boget
i made a Registration Form for user to input their Data, but i also had some Field Check before the data can be insert to the Mysql_Database! I had a question here, sometime the mysql shows the error : Duplicate Key for xxx I know what is this about, reguarding to my Registration Form, it

[PHP] Re: [PHP-DB] PDF

2002-07-08 Thread Chris Boget
If someone has any idea, please let me know I would strongly suggest that you use a PDF class of some sort. There're quite a few available. I've had good results with pc4p. Typically, most PDF classes require that it be working from some sort of static template. If that is fine, then

Re: [PHP] ?????????????????????????????????

2002-07-09 Thread Chris Boget
Dear Lord, where is the admin to boot this guy? That's exactly what he wants. What would be better (and great poetic justice) would be for the admin set it so that all of his emails bounce back to him. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP]Erik Hegreberg

2002-07-09 Thread Chris Boget
He is both, he has been emailed how to get off. For now, I keep just sending my read receipts :) What I did was set up a mail rule where every email I get from him I forward back to him then delete it. So basically he's getting the email that's going to the list then he's getting my forwarded

Re: [PHP] How to know if we're using http or https

2002-07-11 Thread Chris Boget
You can use either of the following checks to see if the user is using HTTPS... $HTTPS == on $SERVER_PORT == 443 Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Table Making

2002-07-11 Thread Chris Boget
Like I said, I shudder at the thought of how much this would load the server (especially on large rows (lots of fields) or large tables (lots of rows = lots of queries)), but if the layout is imperative, then maybe this is an option... No load whatsoever. You just need to think about how

Re: [PHP] Table Making

2002-07-11 Thread Chris Boget
be, but in my head it seems like it would work. Basically, what if the while() printed multiple tables? In each table it made 5 rows, each row with one cell in it, so it would then be vertical. I'm just not sure how to incorporate into the loop (maybe a for() loop is better for this?)

Re: [PHP] Exit script early

2002-07-16 Thread Chris Boget
So I'm creating a details.php page where I'm expecting the url to be something like: My question is what command can I use to end the script [inside the top part of that if statement]? Ironically enough, exit(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] regex in_array or array_search

2002-07-17 Thread Chris Boget
other than each'ing an array and performing a regex match, is there an easier way to parse through the values in an array for a value matching *something*somethingelse* No, I don't believe so. But I'm sure you can set up something to use with array_walk(). Chris -- PHP General Mailing

Re: [PHP] PHP PDF

2002-05-17 Thread Chris Boget
I have the following question : I have constructed several pages with PHP which look likes some reports. (I attached one example to my mail) Now I need to convert this HTML page to PDF to send it by mail . Does any one has an idea ? Check out HTMLDoc. It works wonders for us. Chris --

Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget
Is it possible to create an excel file with some data from mySQL, using PHP ? Yes if you know the file format for excel. If not then write your data into a CSV file. I just output the data as regular HTML (tabled, usually) but send the following headers first:

Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget
It is also possible to connect directly to MySQL from Excel via MyODBC. True, but only if you are running PHP on a windows platform, yes? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget
No, this has nothing to do with PHP. You can run MySQL on Windows or UNIX, doesn't matter, and set up a connection directly from Excel to MySQL. PHP can of course run anywhere you want and manipulate the data in MySQL which will then be reflected in Excel. Are there examples anywhere that

Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget
Are there examples anywhere that illustrate how this can be done? I'm not very interested in looking into this alternative. You are not very interested, but you want examples? eep, sorry. not should have been now. Just read the MyODBC docs at mysql.com. Excellent. Thank you very

[PHP] Secure eval();

2002-05-21 Thread Chris Boget
I need to store equations in a DB for later use. For example, something like the following might appear in one of the fields: (( 2 * 3 ) + 7 ) / ( 8 / 4 ) So I want to eval() *only* equations. However, there is nothing stoping someone from entering in a valid PHP command that accesses the

Re: [PHP] Secure eval();

2002-05-21 Thread Chris Boget
You'll have to come up with a regular expression to check for bad characters. How complex are the equations? If they are like your example, you can just check that the equation doesn't have any letters and is only made up of [0-9+*-/()] characters. It's pretty complex. What I gave was a

Re: [PHP] Secure eval();

2002-05-21 Thread Chris Boget
Are you sure you have to run it through eval()? It sounds like you're creating a query. Couldn't you just create the query dynamically, then put it in a mysql_query() function? (or whatever DB you're using) Then, even if they try some kung fu on you, it'll just result in a bad query, not some

Re: [PHP] Leading zeroes

2002-05-23 Thread Chris Boget
Does anybody have a clever and efficient way of getting rid of leading zeroes in a string? If the string is completely numeric, you can do something like this: $string = 005847; $string = (int)$string; Apart from that, you'll have to run it through some sort of regex, I suppose. Chris --

Re: [PHP] adjusting time() to correct for time zones

2002-05-24 Thread Chris Boget
If there is no other choice, there is no other choice. But in a perfect world, there would be a way to locally correct the server time on a global basis and thus correct ALL applications -- present and future -- that need to know the local time. Is there a way to back track an IP address to

[PHP] PHP5?

2002-07-29 Thread Chris Boget
In the following article: http://www.computerwoche.de/index.cfm?pageid=254artid=38819category=84 Zeev says that PHP5 is expected as early as 1stQ next year. Is there anything anywhere that discusses the new version and any new possible features? Chris -- PHP General Mailing List

[PHP] Public Scripts in a commercial product

2002-07-29 Thread Chris Boget
If someone is going to be using scripts that they grabbed from a public forum (PHP Builder, PHPClasses, etc) in a commercial product (that is going to be compiled with the Zend encoder and released), what is the protocol, if any? Do you have to get permission from the author or anything? I've

Re: [PHP] Browser Javascript capabilities

2002-07-31 Thread Chris Boget
META HTTP-EQUIV=Refresh CONTENT=0;URL=newpage.php?jscript=off Pardon my ignorance, but wouldn't this immediately send the browser onto the next page before it had the opportunity to get to and run this: SCRIPT location.href='newpage.php?jscript=on'; /SCRIPT ? If that's the case, wouldn't

Re: [PHP] Disabling Browser BACK button

2002-07-31 Thread Chris Boget
Page1 (fill in data)-Page2(write data, instant redirect to p1, unless dies from php/mysql) Then the only way to repost, is to push the forward button. Unless, of course, they hit the Submit button again and I think that was the point the original poster was getting at. If the user cannot

[PHP] Getting user's local TZ

2002-08-01 Thread Chris Boget
I looked in the predefined variable section of the manual and couldn't find that there was a way to get this information from that. If there was another way you could get this via PHP, I couldn't find it anywhere else in the docs. So, does anyone know of a good method to get the Time Zone local

Re: [PHP] Date Stuff...

2002-08-02 Thread Chris Boget
Given a date how would you work out number of months elapsed between DateInPast and DateNow? ( $monthTo - $monthFrom ) + (( $yearTo - $yearFrom ) * 12 ) I believe that's the correct equation for figuring out the number of months. Chris -- PHP General Mailing List

[PHP] Re: [PHP-WIN] PDF Files...

2002-08-12 Thread Chris Boget
Any advice as to which of the above is possible/not possible and if not any ways to *mimic* anything. One thing you can look into is HTMLDoc. It turns any (well formed) HTML into a PDF file. We've been using it for about 6 months and it works for exactly what we needed it to do. Chris --

Re: [PHP] Setting the line number for debugging

2002-08-14 Thread Chris Boget
Is it possible to set the line number and file name to show in error messages? __FILE__ __LINE__ Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Setting the line number for debugging

2002-08-14 Thread Chris Boget
As far as I know, __LINE__ and __FILE__ are magic constants which return the current line number and file name. Sorry, I misunderstood exactly what you were looking for. whole script. If now an error occurs on line 362 for example, it is not easy to find the buggy code part, because this

Re: [PHP] Detecting Browser Closing...

2002-08-14 Thread Chris Boget
Is there a function that can detect if anyone has closed the browser? Not in PHP. You can using JavaScript, however. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Detecting Browser Closing...

2002-08-14 Thread Chris Boget
Thanks for the prompt response... Would this mean I would embedd the Java Script in my php Script and alter the php variable accordingly... No, because JS is client side and PHP is server side. What you would need to do is have JS detect when the browser closed and make one last server

[PHP] !== (was Re: [PHP] how many files are in a directory)

2002-08-14 Thread Chris Boget
// Note that !== did not exist until 4.0.0-RC2 I took a quick look at the docs to find out what !== meant (because I'd never seen it before). I'm not sure I understand what it's use is. Could someone explain why you would use it and for what purpose? I couldn't really infer from the example

Re: [PHP] check for a number

2002-09-04 Thread Chris Boget
I am using substr($f, 0, 1); to get the first character of a string but what to be able to tell if the first character is a digit or a letter is there a way to do this? ereg( ^[0-9], $f ) will let you know if the first character is a digit or not... Chris -- PHP General Mailing List

Re: [PHP] Line Breaks in dynamic Download

2002-09-06 Thread Chris Boget
? $file = LINE ONE\nLINE TWO\rLINE THREE\n\r; Try this instead and see if it works... $windowsNewLine = chr(13) . chr(10); $file = LINE ONE{$windowsNewLine}LINE TWO{$windowsNewLine}LINE THREE{$windowsNewLine}; Not sure if Notepad will interpret \r\n correctly... Chris -- PHP General

[PHP] IPlanet Webserver

2002-09-11 Thread Chris Boget
Do any of you guys have experience setting PHP up with the IPlanet webserver? We are trying it out (for a client) and we can't seem to get to so that PHP gets the POST or GET variables passed from a form and would like to talk with someone who's had experience working with or around this

Re: [PHP] Processing PHP in Template File

2002-09-12 Thread Chris Boget
The above process works, as far as replace the place holders, and printing the new content (which is an HTML file). However, it will not process PHP scripts, within the template. If it's really a template, why does it have PHP scripts within? Why not just replace those scripts with place

Re: [PHP] string division

2002-09-19 Thread Chris Boget
which function divides astring to the pieces accorrding to another string. for example according to a comma .. explode(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Visual Studio .NET as PHP IDE

2002-09-23 Thread Chris Boget
Does anyone use VStudio .NET as your IDE in developing PHP Scripts? If so, have you found a way to make it so that it understands PHP? In particular color coding and the understanding of where functions start and end (for the solution explorer, etc). I'm starting to get into C# and I'd like to

Re: [PHP] Visual Studio .NET as PHP IDE

2002-09-23 Thread Chris Boget
try jext ... http://jext.org has a good PHP code browser and can colourise C# and PHP. I appreciate the suggestion but I wanted to know specifically about using VStudio .NET as an IDE for PHP. Don't know what other features you'd want for C# ... In VStudio .NET, the RAD features, for

RE: [PHP] Return or not to return, that is the question

2007-05-30 Thread Chris Boget
If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed? This is precisely the point I was going to make. Unless an argument is passed in by reference for

[PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Is there anything special you need to do to utilize these functions? The former says it's available in versions 4 and 5 while the latter states that it's available in versions = 4.3 and 5 (although is deprecated). I'm currently running PHP version 4.3.11 on a Windows NT box. Based on both

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and check (possibly using phpinfo()) to find out if

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and check (possibly using phpinfo()) to find out if

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Oh, I also forgot to ask what do you get when you use stat()? stat() works, but not if I pass in the actual name of the file. I have to use fstat() in order to get the proper data. I'll have to check to see if there are any functions disabled in the php.ini (I don't believe there are

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Have you uncommented or added `extension=php_mime_magic.dll` in your php.ini file for mime_content_type()? What about adding something like this, as well: extension=php_mime_magic.dll is commented out in my php.ini. So that explains why the mime_content_type() isn't working. That's fine.

[PHP] file_get_contents

2007-06-07 Thread Chris Boget
Does file_get_contents() not work with absolute paths? I'm able to successfully write data to a file that I create dynamically but when I go back to actually read the contents of the file, nothing seems to work. Not file_get_contents(), not file(), not fread() and not fgets(); $mydata =

Re: [PHP] file_get_contents

2007-06-07 Thread Chris Boget
What's going on? That's the strangest absolute path I've ever seen... it seems to have some kind of non-absolute prefix. This has been a troll :) Pardon? I'm not sure what you mean? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Faulting module php4ts.dll

2007-06-08 Thread Chris Boget
We are running PHP 4.3.11 in a Windows Server 2003 environment using ApacheSSL v1.3. Starting just the other day, we starting seeing the following error pop up in the windows eventvwr: Faulting application Apache.exe, version 0.0.0.0, faulting module php4ts.dll, version 4.3.11.11, fault

Re: [PHP] Re: Edinburgh, Scotland: PHP Developer Position

2007-06-18 Thread Chris Boget
PS free milk and cookies and an afternoon nap actually sounds quite good now I come to think about it.. :p Almost better than healthcare and retirement benefits... :) thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] subtracting time from date and time

2007-06-18 Thread Chris Boget
Something like this will get it into a time stamp...and then you can do your calculations with ease, and reformat... ?php $str = 20070617T193500; list($date, $time) = explode(T,$str); ? Even easier: $timestamp = strtotime( $str );

RE: [PHP] subtracting time from date and time

2007-06-18 Thread Chris Boget
This works great tell you get to 8 hours ago it shows the correct time but it does not change the date to the day before. 8 hours ago should be 06/16/2007 11:35:00 but what it shows is 06/17/2007 11:35:00 Your code works for me. Though, I had to change the format of $str slightly to get

RE: [PHP] Force zero numbers on a integer

2007-06-19 Thread Chris Boget
I have a integer that is submitted by the user and i need it to always contain 5 digits. If the user submitted 45, i need it to be 00045. If the user submitted 4595, i need it to be 04595. How can i do this? Check out printf(); http://us.php.net/manual/en/function.printf.php thnx, Chris

Re: [PHP] Database administration framework

2007-06-26 Thread Chris Boget
I just need a framework for administrating tables in a database. These are simple add/edit/remove operations from tables. Can you suggest a framework for this kind of job? Cause there are a lot of tables and I hope I can find a nice tool to work with. What database are you working with?

RE: [PHP] PHP Brain Teasers

2007-07-05 Thread Chris Boget
while( TRUE ) { $actions++; $words--; } $bets = array(1,2,3,4,5); unset( $bets ); $arr = array( 'this', 'that', 'times' ); $arr[] = 'behind'; for( $i = 0; $i = 6; $i++ ) { $deep++; } for( $i = 0; $i = 5; $i++ ) { $flies--; } thnx, Chris -- PHP General Mailing List

RE: [PHP] PHP Brain Teasers

2007-07-05 Thread Chris Boget
Actions speak louder than words. Yup. All bets are off. Indeed. Behind the times. Correct. Deep Six. Got it. for( $i = 0; $i = 5; $i++ ) { $flies--; } Time flies backwards? // Not sure on this one. I wasn't sure if this one was done well enough; I guess it wasn't. The

  1   2   3   4   5   >