On 8/25/12 6:11 AM, Matijn Woudt wrote:
Hi Dante,
Wouldn't it be much easier to use reseller packages like DirectAdmin
or cPanel? AFAIK it should be pretty easy to do the things above.
I'm considering that as well. In the end, I really only want 3
features, however:
- ftp access to files
that has replaced it since then.
-- Dante
On Wed, Aug 22, 2012 at 6:26 AM, D. Dante Lorenso da...@lorenso.com
mailto:da...@lorenso.com wrote:
All,
I need to set up a server to enable 5,000 students to have web
hosting provided by the school with PHP and MySQL support. I'm
All,
I need to set up a server to enable 5,000 students to have web hosting
provided by the school with PHP and MySQL support. I'm trying to figure
out what is the best way to do this.
We have Active Directory and are using Centrify to authenticate
usernames and passwords on our Linux
The school I work with wants to set up PHP and MySQL hosting for about
10,000 students.
I see that in 5.4, PHP safe-mode is being removed. How is it supposed
to be done if not safe-mode?
Are all the hosting providers using suExec and running PHP as CGI or
FastCGI? If I'm trying to do this
bytes in your file as you shuttle chunks to the client instead of
slooping it all into memory in one hunk.
-- Dante
D. Dante Lorenso
da...@lorenso.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
outside of
the function in which the random number is seeded? Or does a different
function re-seed itself automatically?
d) Would php's random number generator be influenced by other programs
running on the system (assuming they're not tampering with the memory
allocated to the running script)?
2
Hello!
Stas has packed PHP 5.4.0beta1 which you can find here:
http://downloads.php.net/stas/
The Windows team provides windows binaries which you find here:
http://windows.php.net/qa/
Please test it carefully, and report any bugs in the bug system, but
only if you
Hello!
Stas has packed PHP 5.4.0beta1 which you can find here:
http://downloads.php.net/stas/
The Windows team provides windows binaries which you find here:
http://windows.php.net/qa/
Please test it carefully, and report any bugs in the bug system, but
only if you
Hello!
Stas has packed PHP 5.4.0beta1 which you can find here:
http://downloads.php.net/stas/
The Windows team provides windows binaries which you find here:
http://windows.php.net/qa/
Please test it carefully, and report any bugs in the bug system, but
only if you
Hello!
Stas has packed PHP 5.4.0beta1 which you can find here:
http://downloads.php.net/stas/
The Windows team provides windows binaries which you find here:
http://windows.php.net/qa/
Please test it carefully, and report any bugs in the bug system, but
only if you
Please test it carefully, and report any bugs in the bug system, but
only if you have a short reproducable test case. The next beta
will be released on Oct 13.
regards,
Stas and David
WHY post it four times??
a glitch with my mail server.
--
PHP General Mailing List
All,
I want to build a config file class that gets called statically. Is
there such a thing as a static constructor? Example:
class Daz_Config {
public static function load() {
...
}
public static function get($key) {
self :: load();
...
}
}
Daz_Config ::
On 3/28/11 8:18 PM, Jack wrote:
Hello All,
Is there a smarter way to do includes by setting up a path or something
where I don't have to include /home/domain.com/includes/include_file.php
Apparently my path is as shown above, but I would prefer to just put in
/includes/include_file.php
I
On 2/18/11 8:39 AM, Kirk Bailey wrote:
Oh hey, that's a good point. All the stuff i saw so far indented 2
spaces. WHY?
Can I just indent a TAB if my editor permits this? indenting 4 spaces (2
nests) is easy, but suppose I hit one extra space- not enough difference
to be really noticeable. Let's
character position in the string. Ron
... but you sound like you are looking for the 'wordwrap' function.
-- Dante
--
D. Dante Lorenso
da...@lorenso.com
972-333-4139
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 11/11/10 12:04 PM, Michael Shadle wrote:
Not to discredit this long post but the media here is now calling
kids who text often hypertexting teens which really irked me
even more...I bet some non-technical news guy thinks he is
awesome for coming up with that one.
LOL! I too thought those
.
-- Dante
--
D. Dante Lorenso
da...@lorenso.com
972-333-4139
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
All,
I want to start using PHP namespaces for my projects. Currently, I name
my classes similar to how Zend Framework names theirs and I end up with
classes like:
LS_Util_String
I'm thinking that if I converted this to namespaces, the classes would
be named like:
LS\Util\String
I'd
Hello,
Have you guys checked this PHP to C++ converter from the Facebook People?
http://developers.facebook.com/news.php?blog=1story=358
Regards,
--
Cesar D. Rodas
cro...@php.net
http://crodas.org/ -- http://cesar.la/
Phone: +595-961-974165
--
PHP General Mailing List (http://www.php.net
a server shutdown (don't need to be written to disk), but I can
not afford for the server to throw away values that don't fit into
memory. If there is a way to configure memcached guarantee storage,
that might work.
-- Dante
On Sun, Jan 24, 2010 at 9:39 AM, D. Dante Lorenso da...@lorenso.com
shiplu wrote:
On Sun, Jan 24, 2010 at 3:11 AM, D. Dante Lorenso da...@lorenso.com wrote:
All,
I'm loading millions of records into a backend PHP cli script that I
need to build a hash index from to optimize key lookups for data that
I'm importing into a MySQL database. The problem
All,
I'm loading millions of records into a backend PHP cli script that I
need to build a hash index from to optimize key lookups for data that
I'm importing into a MySQL database. The problem is that storing this
data in a PHP array is not very memory efficient and my millions of
records are
it and returns its return.
- The client: a PHP script that will exec an RPC,
That is my idea so far, please I'd like to read feedbacks.
--
Cesar D. Rodas
http://cesar.la/
Phone: +595-961-974165
Samuel Beckett - Birth was the death of him.
--
PHP General Mailing List (http://www.php.net
Hi all,
* How better, i can read ms-word doc files from PHP on LINUX OS*.On
searching I got *catdoc* softaware.By using this i can read word doc data as
a text.
function catdoc_file($fname)
{
$ret = exec('catdoc -ab '.escapeshellarg($fname) .' 21');
if (preg_match('/^sh: line 1:
thanks Lucas.This code is very helpful to me.
Hello,
Is there a way to have threads in PHP?
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
( 'global.php' );
echo 'You are in file: ';
myFunc();
?
In each case, what is echoed out for __FILE__ is global.php. Apart from
analyzing the debug_backtrace array, is there any way that myFunc() would
display one.php and two.php respectively?
thnx,
Christoph
--
Best Regards
Cesar D
)
)
if I want to check whether id=5 is in that $nestedarray, how to do
that?!?!
i'd really appreciate the help..
thanks in advance..
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
: http://www.php.net/unsub.php
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
://www.php.net/unsub.php
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
which discuss some simple solutions or articles/blogs on the
web? Clearly I'm not looking for anything as complex as Google's engine, ;-)
but would love just to be able to understand/incorporate a decent level of
search capabilities.
Cheers all,
- sf
--
Best Regards
Cesar D. Rodas
http
No problem,
Just ask your doubts, we're here to help and get help :-)
On 07/12/2007, Victor Matherly [EMAIL PROTECTED] wrote:
Thanks that fixed it. That was so simple no wonder I was banging my head
on the wall :-).
- Original Message -
From: Cesar D. Rodas [EMAIL PROTECTED
/unsub.php
--
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
On 05/12/2007, Per Jessen [EMAIL PROTECTED] wrote:
Cesar D. Rodas wrote:
Call exec is not good, because you are executing other program,
instead of that you should use some PHP program, take a look here
http://www.phpclasses.org/search.html?words=tarx=0y=0go_search=1
The access
better in the following pseudo php code.
function foo($a) {
$GLOBALS['references']['a'] = /*references to $a */
}
function bar() {
echo $GLOBALS['references']['a'];
}
$var=hello
foo($var);
$var = hi;
bar(); /* it should print hi instead of hello */
--
Best Regards
Cesar D. Rodas
On 04/12/2007, Cesar D. Rodas [EMAIL PROTECTED] wrote:
Robert,
On 04/12/2007, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-12-04 at 16:58 -0400, Cesar D. Rodas wrote:
Hello,
I know that PHP doesn't support pointers to a variable, instead of
that
there is references
://www.php.net/unsub.php
--
Best Regards
Cesar D. Rodas
www.cesarodas.com
www.thyphp.com
www.phpajax.org
Phone: +595-961-974165
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
on the end of a php tag
(?) or new line, that is not a bug.
Kevin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Best Regards
Cesar D. Rodas
http://www.cesarodas.com
http://www.thyphp.com
http://www.phpajax.org
Phone: +595-961-974165
On 7/31/07, Crash Dummy [EMAIL PROTECTED] wrote:
Hope this isn't overkill but it is a module (read COM, or VBA
module)
to manipulate the registry:
Overkill is a massive understatement. :-)
No doubt.
To answer everyone's curiosity as to why I want to access the registry, I am
working
On 7/31/07, Ken Tozier [EMAIL PROTECTED] wrote:
...
// set fetch prefs
$this-db-setAttribute(PDO:: FETCH_ASSOC,
true); // also tried 1
...
Is that the way to do it?
Hmm.. Maybe I sent you in the wrong direction - I can't find any docs on
using
Mike,
See entire function under topic Array question - maybe UTF?...
I am trying to change accented characters to their equivalent without accents.
And yes, the arrays look fine after var_dump()...
Gerry
On 2/27/07, Ford, Mike [EMAIL PROTECTED] wrote:
On 27 February 2007 04:23, Gerry D
I have a question on how to retrieve the value that corresponds to a
key in an array.
$fruit = array('a' = 'apple', 'b' = 'banana', 'c' = 'cranberry');
$key = array_search($c, $fruit);
if ( $key === FALSE )
$n = $c;
else
I need PHP to find out if a jpeg file uses progressive encoding. None
of the standard exif or image functions seem to be able to tell me
that. (please correct me if I'm wrong)
Can anybody help me?
TIA
Gerry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi
I'm stuck on The Basics page of the php5 Object Model:
http://uk.php.net/manual/en/language.oop5.basic.php
The top example has the code:
A::foo();
even though foo is not declared static in its class. How does it get
called statically without being declared static?
regards
dave
--
PHP
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
web server: Apache 2.0
php version: 4.3.9
When I use the function mail(), the the from email address that is used is
apache@hostname. I
tried setting the sendmail_from directive in php.ini and the ServerAdmin
directive in
So if I understand you gentlemen correctly, these pre-builds serve as
examples how NOT to do it?
Gerry
On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote:
On Sunday 20 August 2006 20:17, Gerry D wrote:
On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote:
OSCommerce is crap. Don't bother
On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote:
OSCommerce is crap. Don't bother.
Why do you say that, Larry? I may want to get into an app like that
because I think one of my clients is ready for it. What are the cons,
and what are my options? What are Drupal's limitations?
TIA
Gerry
I don't know if you solved this already, but I use it to redirect to
different pages depending on whther the user is logged in or not.
Something like header(location:/page/?p=login); works fine. You were
on the right track.
Gerry
On 6/15/06, tedd [EMAIL PROTECTED] wrote:
Hi gang:
This seems
On 6/16/06, tedd [EMAIL PROTECTED] wrote:
At 2:35 PM +0200 6/16/06, Barry wrote:
But once output is made. You can't remove it.
That isn't possible with PHP.
I think I get it now.
PHP does everything before the user see's anything. Any links (direct or via a
form) are objects that the browser
On 6/28/06, Richard Lynch [EMAIL PROTECTED] wrote:
On Wed, June 28, 2006 5:17 am, kristianto adi widiatmoko wrote:
i need to redirecting page, it could be done by using header function
like this
header(Location : page2.php?var1=foo);
Then, the URL should be a full, complete URL, and not
Jay,
I use a technique to prevent hitting the back button and
resubmitting data. I use a 2-script process, one with the form and
submit button (I set a session var here), and a second form (the
action script). The action script makes sure the session variable is
set, processes the info, then
On 6/30/06, Richard Lynch [EMAIL PROTECTED] wrote:
#2. Don't alter the case of the input data, if at all possible.
Accept what the user has given, and take it as it is. You can make
your application not care about case, and you can format the case on
ouput (maybe even with fancy CSS stuff) but
Richard,
Within the US that might be ok, but given latest developments, who
wants to fly into the US from elsewhere? I could drive from Canada if
I take 2 weeks vacation...
I don't want to be a show stopper, but I think you need to explain
what your target audience is re global travel, not just
My implementation of captcha eliminated chinese spam.
See http://www.lilyregister.com/page/?p=contact
Gerry
On 8/9/06, Micky Hulse [EMAIL PROTECTED] wrote:
Hi,
Recently, a client of mine was getting a ton of spam email from a site
called hotbox.com. I updated her form to one with more spam
They're not Jap but Chi. And they drove me crazy on my websites until
I fixed them.
http://www.lilyregister.com/page/?p=contact is what stopped the idiots.
Gerry
On 6/19/06, Denis Gerasimov [EMAIL PROTECTED] wrote:
Hello List Members,
I am very tired of deleting spam messages received from
Tedd,
Interesting that nobody knows the answer... I am struggling with this
very issue for an international lily register...
http://www.lilyregister.com/
Gerry
On 6/5/06, tedd [EMAIL PROTECTED] wrote:
At 7:08 PM -0700 6/4/06, Rasmus Lerdorf wrote:
Larry Garfield wrote:
In C or C++, yes. In
a p_position (parent position) and c_position (child)
for each of the menu items, that way I can do a ORDER
BY in my query and it should still look good and
changing positions shouldnt be a problem (ask anyone
who's married, being flexable in changing positions is
VERY important :-D )
Doing an ORDER
Albert Padley wrote:
Thanks everyone. Always nice to know there is more than one direction
to go in.
A alternative to variable variables might use these:
http://us3.php.net/manual/en/function.compact.php
http://us3.php.net/manual/en/function.extract.php
'extract' looks like it might be
Dave Goodchild wrote:
if $_REQUEST['page'] is not set, why not do this:
$page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1;
(ternary operator)
// test, numeric read, with default and bounds checking
$page = empty($_REQUEST['page']) ? 1 : intval($_REQUEST['page']);
$page = min(max($page,
All,
I just discovered this neat little gem in MySQL which makes it easy to
page large result sets:
* SELECT SQL_CALC_FOUND_ROWS *
FROM table
LIMIT 10, 10
* SELECT FOUND_ROWS()
The neat thing is that SQL_CALC_FOUND_ROWS will cause MySQL to tally up
all the rows that WOULD
Richard Lynch wrote:
3. use the built-in cursor of PostgreSQL which pre-dates MySQL
LIMIT and OFFSET clauses, which are non-standard hacks Rasmus
introduced back in the day.
Care to elaborate? Cast into context of PDO if you can...?
Dante
--
PHP General Mailing List (http://www.php.net/)
To
[EMAIL PROTECTED] wrote:
I need to calculate no. of days between two dates, actually between date
stored in DB and today's date.
Does anybody has an example I can use?
Your database will have this function. In PostgreSQL:
SELECT data_column - NOW() AS date_diff;
There are similar
Ashley M. Kirchner wrote:
I have a form with various fields on it that I want to make sure
aren't empty or the user didn't just hit the space bar or return (in a
text field). What's the best way to do this? Seems empty() will fail
on a textarea if the user simply hits a space or return and
Mariano Guadagnini wrote:
Hi list,
I hace an existencial doubt: i've seem many scripts declaring classes
as stdClass. In the documentation (for PHP5 and also for 4), it says
that this class is internal of php, and should't be used. By the
manner I saw it's being used, i guess that it can be
:
--
pre
?php
$zero = (string)'0';
$one = (string)'1';
var_dump($zero);
var_dump($one);
printf(char: %s, ord: %d, byte: %08b\n, $zero, ord($zero), $zero);
printf(char: %s, ord: %d, byte: %08b\n, $one, ord($one), $one);
// string(1) 0
// string(1) 1
// char: 0, ord: 48, byte:
weetat wrote:
Hi all,
I am using php 4.3.2 and mysql , linux.
I have a sql statement below :
UPDATE tbl_chassis_temp SET country = 'Singapore', city
'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40',
I need to remove the last comma from sql text above.
I have
Jon wrote:
The second thing that needs to be said here is simply a re-statement
of the original, this time more verbosely. The list of things in php
that evaluate as false is as follows:
* the boolean FALSE itself
* the integer 0 (zero)
* the float 0.0 (zero)
* the empty string, and the
[EMAIL PROTECTED] wrote:
What are some of the other killer features of PHP5 that I may be sleeping on
here.
You have got to get your hands on XMLWriter. I don't write any XHTML
inside php any more. I've wrapped the XMLWriter object inside my own
object and now I can create 100%
I was about to write code to recursively list the contents of a
directory when I remembered seeing an object in SPL that would do it for me:
http://us3.php.net/manual/en/function.recursivedirectoryiterator-next.php
But there is no documentation on this object, and although I have it in
Jochem Maas wrote:
also take a look here:
http://www.wiki.cc/php/RecursiveDirectoryIterator
yes it's meant to be used, yes you can use it in production BUT your
a little on the bleeding edge (not very many people using it full on) AND
the whole of SPL is still a little in flex (as is php5-php6
I also have a strong suspicion this webmail will be sending this HTML
formatted, so I apologize in advance. Anyway, here it goes!
Greetings All!
I'm trying to build a webpage that will pull out server information using
snmpget and snmpwalkoid, among other things.
Most of the things I poll are
Paul Goepfert wrote:
... What this script does is selects tomorrows date...
Here is a one-line way to find the month and day of tomorrow:
?php
list($tomorrow_month, $tomorrow_day) = split(':', date('m:d',
time()+86400));
?
Test that ... I just wrote it off the top of my head. Maybe that
Greetings,
I'm creating a more or less 'dashboard' where people can enter the
server name, then I'll snmpget a bunch of different oids and show the
status of the device.
Now the problem is snmpget doesn't allow multiple OIDs in one go, so I
have to snmpget(server, community, oid1);,
So I'm writing this page (PHP Newbie here) and it checks to see if a var
is set, if it isn't it spits out the form info like so: echo form
action=myform.php method=post;
Now is there a way to 'wrap' that so I don't have to escape quotes?
Something like perls 'qq' function is what I'm looking for.
All,
I want to clean up my PHP.ini file on production to be as streamlined as
possible so that it's easier to work with and maintain. It is easier to
do a diff of my INI and the recommended INI if both files are very
similar with whitespace removed, comments cleaned out, and keys sorted,
All,
Can anybody give me a pointer on where I might start to learn how to
embed Zend2/PHP 5 inside a stand-alone C application?
I realize that by asking a question like this it might imply I am not
prepared enough to do handle the answer, but ignoring that, is there a
document out there?
Dallas Cahker wrote:
how do I get the subdirectory that a page is being pulled from.
say I have three sites running the same script and I need to determine
which
site is which.
http://www.domain.com/subdir1
http://www.domain.com/subdir2
http://www.domain.com/subdir3
and subdir1, subdir2 and
Greetings,
Seem to have a bit of a problem I can't figure out. I'm trying to query
servers via SNMP with PHP's snmpget function. Everything seems to work
fine, no problems at all - except I'd like the web page to print the
string value instead of the numeric value (I.E. OK for the Compaq Drive
Greetings,
PHP Rookie here with a quick question - how do I go through 2 arrays at
once with different keys?
I'd like to combine these 2 arrays into one:
for ( $i = 0; $i sizeof($logicalDrive); $i++) {
echo $arrLogDrive[$i]br /\n;
}
for (reset($logicalDrive); $i =
Thanks for all the replies guys, it really helped me pick up a few
things.
One I ended up doing was using array_combine, like so:
$d = array_combine($arrLogDrive, $logicalDrive);
print_r($d);
for (reset($d); $j = key($d); next($d)) {
echo $j: $d[$j]br /\n;
}
Now, while it works spot
Robert Samuel White wrote:
When I ran the command:
pecl install zip-1.3.1
It intalled the zip.so file to:
/usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so
Extensions are compiled with a given Zend/PHP API. The zip extension
you installed was compiled against the API dated
I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I
expect. I am under the impressing that until I call 'endElement', I
should be free to continue adding attributes to an opened element
regardless of whether I have already added elements or text below it.
Look at this
Rob Richards wrote:
Expected behavior. See comments within code snippet.
D. Dante Lorenso wrote:
I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave
as I expect. I am under the impressing that until I call
'endElement', I should be free to continue adding attributes
Richard Lynch wrote:
On Thu, May 11, 2006 6:02 pm, D. Dante Lorenso wrote:
pecl install memcache
Is it possible that pecl has an --extension-dir flag to tell it WHERE
to install stuff, or perhaps an optional command line arg or ...
Cuz, really, the odds on it being where you want
Richard Lynch wrote:
On Tue, May 16, 2006 10:34 am, D. Dante Lorenso wrote:
Richard Lynch wrote:
On Thu, May 11, 2006 6:02 pm, D. Dante Lorenso wrote:
pecl install memcache
s it possible that pecl has an --extension-dir flag to tell it
WHERE
to install stuff, or perhaps
I'm having difficulty displaying text after imagefrompng(). I'm using
PEARS's Image_Barcode to displa a barcode and trying to wrap
imagefrompng() around it. I am able to display the barcode properly but
not the rest of my document (a mix a text and other images).
Is there a proper heading I
I'm on the latest and greatest PHP 5.1.4. I can see the function I
think I want in the manual:
http://us3.php.net/manual/en/function.xmlwriter-write-raw.php
But the manual says it's only in CVS. I confirmed that I don't have it:
*Fatal error*: Call to undefined function
Marcus Boerger wrote:
I think that's a bug and not a feature. Why was this changed?
It is called write support. I think we are going to add a flag
so that one can specify whether write support is enabled or not.
Creating data without using '=' assignment or calling a function is
All,
I'm interested in a PHP application server that is non-webserver based
which I can run on Linux. I was hoping for something like:
* http://www.vl-srm.net/index.php
Does anyone know about this project? It appears to be dead. Hasn't
been updated in a couple years. Is there a
All,
I'm really having a hard time making sense of PECL and PEAR. My
understanding is that PECL is for PHP extensions (written in C using the
extension API) and that PEAR is a repository of PHP modules (classes
written in PHP using the PEAR-approved framework).
PEAR VS PECL COMMANDS
On my
Steven Stromer wrote:
For years I was lulled into thinking I understood php include
functions...
I have always used relative paths in my include and related functions,
for instance:
include_once (lib/included.php);
However, I am now needing to switch to absolute paths:
include_once
All,
I installed an extension via PECL and it seems to have plopped the
extension into it's own extension directory instead of the one in my
PHP.ini file.
pecl install memcache
/usr/lib/php/extensions/no-debug-non-zts-20050922/memcache.so
But my PHP.ini file says to use:
grep
If you are using PHP 5, you might have some fun with the __autoload()
function. I use something like this in production:
//--
function __autoload($class_name) {
require_once ($class_name..php);
}
function push_libs() {
I've recently upgraded to PHP 5.1.4 from 5.1.2 and noticed that in 5.1.3
there were changes made to SimpleXML. Now, when I touch an element
which didn't used to exist, instead of acting like it didn't exist, it
creates it! That's horrible!
Well, this used to work:
?php
$xmlstr =
Does anyone know if it's possible to reference class constants or static
variables without having to use 'self::' all the time?
class A {
const MY_CONSTANT = true;
public function test() {
echo self :: MY_CONSTANT; // works
echo MY_CONSTANT; // doesn't work
}
}
I don't
John Wells wrote:
On 5/9/06, D. Dante Lorenso [EMAIL PROTECTED] wrote:
Does anyone know if it's possible to reference class constants or static
variables without having to use 'self::' all the time?
No, ... Why? The reason is SCOPE.
As wonderful as PHP is, it can't read your mind. So
D. Dante Lorenso wrote:
As an OOP programmer, I would expect the scope search to be as follows:
1. LOCAL: current method
2. THIS: current instance ($this)
3. SELF: current class parent classes, in order of inheritance
4. GLOBAL: globals
Actually, 2 and 3 are really the same but only
All,
I have a file which I want to stream from PHP:
readfile($file_name);
However, this function has the problem that it reads the whole file into
memory and then tries to write it to output. Sometimes, you can hit the
memory limit in PHP before the file contents are completely output
Jochem Maas wrote:
D. Dante Lorenso wrote:
All,
I have a file which I want to stream from PHP:
it's not that relevant, but, I don't thinking streaming is the correct
term.
your merely dumping a files' content to std output.
readfile($file_name);
the trick you need to employ
Eric Butera wrote:
On 5/9/06, D. Dante Lorenso [EMAIL PROTECTED] wrote:
To do this, I would think I need a function in PHP which will output a
buffered stream with blocking enabled. Can anybody point me in the
right direction?
I'm probably way off base on what you're trying to do, but maybe
1 - 100 of 559 matches
Mail list logo