';
echo 'Original Net | ';
echo 'Commission %<
> I am looking for a PHP based packaged (though it doesn't necesarily have
to
> be) that will convert HTML files to their PDF representations; on the fly
of
> course. Anyone know or have any experience w/this? Thanks in advance,
We use htmldoc.
http://www.easysw.com/htmldoc/
thnx,
Chris
--
PHP
I've tried google and also the PEAR documentation but I can't
figure out how to run a stored procedure that uses an OUTPUT
parameter. I keep getting an error saying that the variable used
as the OUTPUT parameter must be declared. But how can I
declare it using PEAR?
Has anyone run across this? I
> If it's because of memory issues then it will indicated by an error
> message saying that your script has tried to allocate more than the
> allowed memory limit (and it's easy to fix by adjusting this limit in
> php.ini)
Actually, I'm not getting any error at all. The script just halts. I am
o
Is there a hard limit to the size of the file you can load into the DOM
using either of the above functions? I ask because I have a 5mb XML
file I'm trying to load and both functions die when used. I've whittled
the size down to about 1.5mb and both functions then work. It's not
as if it's dying
> On a site I'm listing measurements in both inches and cm; in the db
> they're stored as inches. To convert them to cm I'm doing:
> x ($cartoon['art_height'] * 2.54); ?> cm
> How can I limit the result of that math to one decimal place, ie, 9.5
> cm, not 9.523 cm?
ummm, round()?
thnx,
Chris
> On windows platform I use HomeSite 5.5 and I'm more then happy.
I was a big proponent of HS for the longest time until I played around
with Visual Slickedit. I very quickly switched and never looked back.
VS is infinitely more feature rich than is HS.
thnx,
Chris
--
PHP General Mailing List
Slickedit has a linux flavor and is an exceptional IDE (in general;
at least, on Windows).
http://www.slickedit.com
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Run this code:
";
} else {
echo "'NULL' != 0";
}
?>
Is this just a case of PHP converting variable types for comparison?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> > You can use defined() to check to see if a constant has been
> > defined. You can use function_exists() to see if a function
> > has been defined. But what can you use to check to see if
> > a class has been defined?
> class_exists()
I found that after it dawned on me to search for the phra
You can use defined() to check to see if a constant has been
defined. You can use function_exists() to see if a function
has been defined. But what can you use to check to see if
a class has been defined?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
> > Has anyone else noticed significant delays in messages getting posted?
> No, no delay on my end.
At least 4hrs on my end...
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> That being the case, you may want to consider ajax, so that users
> answers are recorded as soon as they make them.
What's 'ajax'? Link please?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Is there any way I can copy an element from one DOM document to another
> without having to dissect the original node/element and create a new
> node/element from scratch using the new DOM document and append to it?
Never mind. Apparently I can use clone_node(). When I tried that before
I was
Consider the following test script:
$doc = domxml_new_doc( '1.0' );
$domNode = $doc->create_element( 'Node' );
$node = $doc->create_element( 'NodeChild' );
$textNode = $doc->create_text_node( 'this' );
$node->append_child( $textNode );
$domNode->append_child( $node );
$doc->
> This should be easy, but refuses to work:
> if(
> ($mydata->address != "")
> and
> ($mydata->addresspublic == "yes")
> )
> {
> }
Are you getting any errors? If so, what are they? Also, shouldn't
the code look like this:
if(
($mydata->address != "")
&&
($mydata->addresspublic == "yes")
)
{
}
Consider the following test code:
$doc = domxml_new_doc( '1.0' );
$baseDocument = domxml_new_doc( '1.0' );
$domNode = $doc->create_element( 'Node' );
$node = $doc->create_element( 'NodeChild' );
$textNode = $doc->create_text_node( 'this' );
$node->append_child( $textNode );
> I'd like to know if it is possible to perform a search across multiple
> mysql tables within a single query.
Look into UNION.
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I need to access a website (written in php) using two different
> domains (www.foo.com and www.bar.com). I must see the same content.
> Since the site uses session and cookie variables I was wondering if
> (and how) it's possible to create a session id that is valid for the
> domains I'll be usin
> i've checked the PHP manual but can't find a function for this, perhaps
I'm
> missing something.
> I get a resultset and loop through it but this is in a loop so it only
executes
> the first time. is this because the resultset is at the end? is there a
way to
> tell PHP to start at the beginning
Thank you for everyone's suggestions. Using them
(and a few other things I've found elsewhere), I've
come up with the following function:
function roundToNearest( $number, $toNearest = 5 ) {
$retval = 0;
$mod = $number % $toNearest;
if( $mod >= 0 ) {
$retval = ( $mod > ( $toNearest /
I realize this is a dumb question but I just can't come
up with an equation that will do this and I don't see an
internal PHP function (for version 4.3) that will do this...
Basically I need to come up with an equation/algorithm
that will round any number up/down to the nearest X.
I tried using
y
Is there a way to programatically get information about a
specific table and/or field? And also any constraints that
a field has?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Look into the INFORMATION SCHEMA views in SQL Books Online for a
> starting point.
Excellent tip! Thanks. With the help provided by everyone who
replied, I came up with the following:
Query to get the primary key(s) for a table
sp_pkeys @table_name=''
Query to get the column names for a t
> R> Just build a JOIN query and do one query.
> Doing a join on four tables is ok? (serious question, not being
> facetious).
Yes. I've built a query before (for reporting purposes) that join
15 tables... Just make sure the tables are indexed properly.
thnx,
Chris
--
PHP General Mailing List
> The actual SELECT statement is as follows:
> $sqlCourses="SELECT * FROM " . $tbl_courses . " WHERE courseDate > '" .
date("Y-m-d") . "' ORDER BY " . $orderBy . " ASC";
> the $orderBy variable is set via $_GET['orderBy'] which is sent by the
> table headers as below:
I'm curious why you aren't jo
> I can do that, but is there a better way? How do you all handle
> dynamic sorting of normalized DBs?
Firstly, what DB are you using?
Secondly, just select and sort on the columns. An example query
would be:
SELECT
course.name,
location.name,
instructor.name
FROM
course
INNER JOIN locat
> If I make one pass and get 1mb of the blob...the
> browser is simply going to load that 1mb only, right?
> How do I keep looping and refreshing the users
> browser, or in this case, flash player?
> Thanks for any ideas!
Look into flush();
thnx,
Chris
--
PHP General Mailing List (http://www.p
> Please refrain from such speculation, because it does nothing to improve
> the state of security within our community. This idea of storing
> passwords in cookies is absurd.
Is the above sentiment true even if you store the password as some sort
of hash (md5 or otherwise)?
thnx,
Chris
--
PH
> I can't figure out how to separate these variables and values so that I
> can do what I need to do.
> I've got
> foreach($_POST as $var=>$value) {
> }
> but can't seem to figure out what to do inside.
> Ideas??
What you could do is rename the form field names. Instead of naming
the field 'tax0
>> I don't see a graceful way of finding the first element's key ID.
>> Array
>> (
>> [3] => fooObject Object
>> (
>> [id:protected] => 3
>> [model:protected] => ABC
>> [read:protected] => public
>> [write:protected] => private
>>
If you use the mysql command line tool, you can pass
the -X parameter so that all results will be returned in
XML format. Is there an easy way to do that in PHP
using the native mysql_*() functions w/o having to
manually generate the XML using the result set? Or
does anyone know if this is possib
> I've had a production system moved to a new server. Our geniuses here
> have refused to allow sendmail on the server and all my e-mail
> functions are now gone. Is there a way around this? I have already
> checked the manual, I don't see anything
You can always look into utilizing PEAR::M
> Hi All, I have some reports I need converted from HTML to PDF, I'm on a
> LAMP box, so does anyone have any free suggestions?
Google htmldoc
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Hi, i wanna ask if anybody knows how to calculate the total process
> time of a script. I guess there exists a
> function to perform but i dont know which one it is. I mean if u c any
> PHP Nuke site, it says this page is produced in seconds. I made
> some codes it calculates but i dont beli
I have the following Class:
class MyClass {
function store_myself() {
$query = 'INSERT INTO mytable ( myfield ) VALUES ( ' . $this . ')';
$result = mssql_query( $query );
}
}
which works. Kind of. What I expected was a serialized copy of the
object to be stored in the column myfield
Is there a way to take an already existing DomDocument object
and appending it as a child node within a seperate DomDocument
object? Or would I have to pull it apart first and generate new
DomNode/DomElement objects using the data then append those
DomNode/DomElement objects to the seperate DomDoc
> Consider the following:
Never mind. I'm retarded. :p
Sorry, folks. Nothing to see here but an empty
brain cavity. Move along. :)
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Consider the following:
This function
-
function setAttribute( $nodeName, $attributeName, $attributeValue ) {
$domElement = $this->DOMDocument->get_elements_by_tagname( $nodeName );
if( $domElement ) {
echo 'ObjectData: ' . print_r( $domElement,
> not sure if this is a stupid question,
> but im looking for a person or a place that will check or try to "break" a
> site.
Check out Netcraft. They are very good though quite pricey, however.
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php
> The case is what's stopping it from working
> a str_replace(strtolower($exceptionphrase) , '' ,
> strtolower($stringtoparse)) would take the case out of the equation
No, that didn't entire quite work, either. The result from this
change is "or ldy lughed" and not the desired result of "lady
la
Is there a way to replace/remove *whole* words from a
phrase? For example:
0 ) {
foreach( $exceptionsList as $exceptionPhrase ) {
$stringToParse = str_replace( $exceptionPhrase, '', trim(
$stringToParse ));
}
$retval = trim( $stringToParse );
}
echo 'Retval: ' . $retval .
Consider the following:
function test() {
static $i = 0;
$i++;
$retval = ( $i <= 10 ) ? $i : '';
return $retval;
}
while( $bob = test()) {
echo $bob . '';
}
You would expect the while loop to go on forever just looking
at the above code. However, what's happening
In earlier versions of PHP, you could use the $HOSTNAME
global variable to get the server/machine name that is running
Apache/PHP. However, that variable is no longer working
and I can't seem to find a replacement in any of the super global
variables. Is there one? How can you get the server/mac
> A bit off topic, what are people out there using for PHP IDE's?
Thought not specifically a PHP IDE, I use Visual Slick Edit (which
is cross platform). It's probably the best IDE I've come across to
date.
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: htt
> Currently i have a Defiune setup of:
> define("THS", "This is a test");
> I also have a string value of
> $that='THS';
> When I echo out $that it get THS.
> I want to echo out $that and get:
> This is a test.
> How can I do this?
$that = THS
You don't want the quotes.
thnx,
Chris
--
PHP Gene
What are some of the things you guys do to get around the
fact that classes in php4 can't do multiple inheritance?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Hi there,
> I would like to add a > symbol infront of each line I pull out of a
database.
> Similar to the function seen in online e-mail clients when you click on
reply.
> Has anybody an idea on how to add a symbol in front of each line?`
Should be simple enough using explode() followed by impl
What would the regex look like to accept *any* character
for a value but the total length of the value can be no greater
than 50 characters. The regex I am trying to use is as follows
^[\d\D\w\W\s\S.]{0,50}$
but it doesn't appear to be working...
Any ideas?
thnx,
Chris
--
PHP General Mailing
> You mean like this...
> $sub = array
> (
> 'name' => 'Ahnold',
> 'address' => '123 Someplace Nice',
> );
>
> $bigArray[] = $sub;
Something else that will work is the following:
$arrPt =& $Arr[];
$arrPt['name'] = 'bob';
$arrPt['address'] = 'wherever';
thnx,
In PHP4, is there any way to interrupt instantiation of an
object? For example, by returning NULL as the return
value of the class constructor so that the variable you are
assinging the object to is, instead, null?
Here's what I'm trying to do:
class MyClass {
function MyClass() {
return N
> A work around I've used in the past has been to use a keyed array such as:
> $MyEnums = array(
> "is" => "This",
> "at" => "That",
> "er" => "Other"
> );
Only problem is that the above doesn't address my need (which I
included in a subsequent post and probably should have included
in my initial
> reference like MyClass::MyVar. Don't use PHP5 conventions in PHP4!
I'm curious if you tested your code? Did it work? If so, what
version of PHP are you using? I copied and pasted the code
you provided and got the following error:
Parse error: parse error, expecting `','' or `';'' in
/usr/loc
> I believe you can make the property static (at least in PHP5):
> class MyClass
> {
> public static $myClassVar = "Bob";
> }
> echo MyClass::$myClassVar; // Bob
Unfortunately, in PHP4.3.2 that doesn't seem to be working... :(
Does anyone know how I can access a class' variable w/o having
to insta
If I have a class that looks like this:
class MyClass {
var $MyClassVar = "Bob";
}
is there a way to reference that variable w/o instantiating
MyClass? I've tried:
MyClass::$MyClassVar
MyClass->$MyClassVar
MyClass.$MyClassVar
nothing works. Is this even possible? I'm using PHP 4.3.2.
thnx
> > Anything that doesn't use the word 'flava' :)
> What if I name all my variables after Rocky characters? ;)
Hey! You stole my method! Actually, mine are Rocky and
Bullwinkle, but still! :p
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.n
> Did anyone ever solve the shiflett-clock.gif puzzle?
What's the puzzle?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I am looking for the best way to have a user enter information and
> format it ... i.e. Bold, Italics, etc... with out havng to use the
> HTML commands...
> Using PHP4.
> Any suggestions...
Take a look at the way phpBB does this.
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
T
> I've been RTFMing for about an hour and I can't find a string function
> to split haystack 'onetwothreefourfive' at the nth
> occurrence of needle ''. strpos gives me the position of the first
> needle, and strrpos gives me the position of the last needle. But I'm
> looking for the position o
Does anyone know if a workflow suite/engine written in
PHP exists?
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> > [snip]
> > Hey everyone, don't know about you, but I'm sick of spam and so I've
> reported the spammers
> [/snip]
> Which "spammers" are you referring too?
I believe he made reference to them in his original post here:
> so if you have a minute and are sick of the garbage from suisse bank a
Why isn't my regex working? From everything that I've
read, it should be...
$string = "[joebob]";
if( preg_match( '/\[(\s+)\]/i', $string, $aMatches )) {
print_r( $aMatches );
} else {
echo 'No match was found' . "\n\n";
}
Chris
--
PHP General Mailing List (http://www.php.net/)
To u
> I believe there is a PEAR library package that does this. You might want
to
> do some research to see if it fits your needs.
Take a look at the following:
http://pear.php.net/package/DB_DataObject_FormBuilder
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: ht
> generate forms but I still have to create each input..i.e
> $forms->inputBox(), etc. I want to be able to pass in a table name and
have
> a form returned to me. How do other's handle this? My first thought is
to
> have an xml file that maps the database columns to form elements such as
> text,
> > same configuration. Where would I look to discover why one
> > server would have data held in $HTTP_RAW_POST_DATA
> > whereas the other server would not?
> Check the value of "always_populate_raw_post_data" in php.ini
> on both servers.
That was it. Thank you so very much!!
Chris
--
PHP
I was looking through the documentation and I could not
figure out why the following is occuring:
On our development server, I have a script that accesses the
value of $HTTP_RAW_POST_DATA (upon form submission)
and there is data there. However, on our production server,
the same code shows no v
> Include a content from another URL into the current output. I have done
> something like this:
Look into the fopen() function. I also believe that the file() function can
also take a URL, but I'm not sure.
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
> i guess you didn't read the second part of my email that started after
> the "ON THE OTHER HAND" line.
Ok, yes, I am a retard. :)
Chris
-never mind me.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> function cleanFinalOutput($html){
> $return = eregi_replace("\n", "", $html);
> $return = eregi_replace("\r", "", $return);
> return eregi_replace("\t", "", $return);
> }
Not to be too pedantic, but you could probably reduce the above
to a single line function:
function cleanFinalOutput($
> > Not exactly... I was not reffering to PHP files... The white spaces
> > from a template file will make double the size of certain files when
> > they are sent to the browser... So a page of 50 k might have 100 K
> > because of those white spaces instead of tabs... For a dial up
> > connection t
> [quote]
> In PHP 4, only constant initializers for var variables are allowed. To
> initialize variables with non-constant values, you need an
> initialization function which is called automatically when an object
> is being constructed from the class. Such a function is called a
> constructor (se
> What I am looking for is something to work pretty fast, have code
> autocompletion (even for functions defined in the included files like zend
> does) and also code ident in a similar manner with zend studio
Check out Visual Slick Edit. After using many of the more oft suggested
editors, I foun
> it is number_format http://www.php.net/number_format
You can also use either of the following:
http://us2.php.net/manual/en/function.sprintf.php
http://us2.php.net/manual/en/function.printf.php
echo sprintf( '%.02f', 59.9 );
Chris
--
PHP General Mailing List (http://www.php.net/)
To uns
101 - 200 of 419 matches
Mail list logo
|