Also, you might try asking on a RH list or forum, this might be a known
issue with a workaround. If all else fails, file a bug.
--
Greg Bair
PHP Developer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
he Closure class.
Thus, if it supported the $this variable, it would refer not to the
class you want, but instead to the Closure class.
Just my understanding. If it's not right, someone point it out.
--
Greg Bair
PHP Developer
--
PHP General Mailing List (http://www.php.net/)
To unsub
et($_GET) ? array_map("slashes", $_GET) : array();
$_POST = isset($_POST) ? array_map("slashes", $_POST) : array();
$_COOKIE = isset($_COOKIE) ? array_map("slashes", $_COOKIE) : array();
}
function slashes($var){
if(is_array($var))
return arra
here
now, so you might want to try a few. And there are several BSD
distros as well depending if you want security, hardware support, or a
little of both. Most anything released in the last year has included
or will support Apache2 and PHP5. If not it probably will soon.
I run Gentoo and
On Mon, 07 Feb 2005 22:25:46 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I think this is an extraordinary (and unjustified) level of paranoia.
cat /dev/mem | strings | egrep "^[0-9]+$"
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General
On Mon, 7 Feb 2005 16:21:26 -0600, Brad Ciszewski <[EMAIL PROTECTED]> wrote:
> What is the function, or how do you make a script that displays the server's
> uptime?
php -r 'system("uptime");'
or
--
Greg Donald
Zend Certified Engineer
http://destiney.com
curses using it with C, but then
later I discovered the PHP ncurses functions are mostly the same.
Here's the docs I read:
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
On Tue, 8 Feb 2005 12:50:59 -, Phil Ewington - 43 Plc
<[EMAIL PROTECTED]> wrote:
> So my question is can I easily/safely edit files outside of the web root
> using PHP or is there a 3rd party command line tool to do this?
sudo can assist you with this task.
--
Greg Donald
Ze
On Tue, 08 Feb 2005 03:14:43 +0100, Niels <[EMAIL PROTECTED]> wrote:
> I'm doing an intranet website for managing users. I need to be able to
> change passwords, move files and folders around and that kind of thing.
> What is the best way?
sudo can assist you with this tas
On Tue, 8 Feb 2005 14:19:38 +, Rory Browne <[EMAIL PROTECTED]> wrote:
> This question is as much about politics, and religion, as it is technical.
In all my years of attending Church I never once heard anyone
discussing Linux. Must be a denominational thing.
--
Greg Donald
Zend
ill google
It's pretty simple to scrub the data away.
$cc = '1234123412341234';
// do processing
$cc = md5( time() );
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ong I was:
#!/usr/bin/php
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.org/ ?
Thanks,
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
are many options, but sudo is
specifically written to achivieve secure temporary elevated
permissions. If you roll your own solution you will arrive at the
same end result, an application that raises permissions. I see no
reason to invent a new wheel. You may, I don't know.
--
Greg Donald
ok me a while to finish, but that
was to be expected when you got 151 new conf files to merge.
> I use it myself for all my workstation and server
> needs. Good luck on finding one that suits you, though.
Yeah, too bad there's no World of Warcraft for Linux.
--
Greg Donald
Zend Ce
stable'
release. You'll have to buy a copy of RedHat for that. As "a new
convert form windows" I thought you might want to know.
Join you local Linux user's group. Go to an install-fest. Grow.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ollar.
Not all of us are CEOs of big companies, some of us are just mechanics
working under the hood trying to make a living.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
break;
}
}
However, why not use for()?
for($i=0;$i<10;$i++) {
// do stuff
$rss = next($rsses);
}
reset($rsses);
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
se a counter variable and break.
php.net/break
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ModRewrite
RewriteEngine on
RewriteRule ^([A-Za-z].*) index.php?var=$1 [L,qsappend]
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;
07:35:21 up 7 days, 23:10, 5 users, load average: 1.11, 0.69, 0.28
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
deletes
// make new tmp_file
}
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ed in a session both ways,
as a string and cast to an integer:
v|s:3:"123";
v|i:123;
There are other things too.. like converting IP addresses to longs
with ip2long(). Storing a long int is more efficient than storing
7-15 bytes of character data.
Just look at your session data an
replace( '/[^\d]/', '', $var );
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t
> worth it.
Comments in the code make using short session variable names a non-issue.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
query( $sql ) or die( mysql_error() );
return mysql_affected_rows();
}
session_set_save_handler(
'sess_open',
'sess_close',
'sess_read',
'sess_write',
'sess_destroy',
'sess_gc'
);
session_start();
$sn
.com/zoom/benchmarks.html
At the web dev shop I work at, we have two developers who code in both
PHP and ASP, and they both like ASP better. *shrug*
I found this just the other day, discusses PHP vs. Perl:
http://tnx.nl/php
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
P
/_eid_page_functions.php on line
> 173
>
>
> it appears to be very random... could be my PHP code... but the only
> thing that has happened since this error occured is that we moved the
> site to a new server
I saw an error like that once when I had a space at
lication-level GET_LOCK() and RELEASE_LOCK().
InnoDB wasn't available in MySQL when I put that code together. I got
the base code from:
http://php.net/manual/en/function.session-set-save-handler.php
and tweaked it to use MySQL. If you need a row level locking capable
version, have at it.
--
ts/phpexcelreader/
TIA
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
die (mysql_error());
break;
case "addletter":
//Get the form variables
$lgroup = $_POST['lgroup'];
$lname = $_POST['lname'];
$content = $_POST['lcontent'];
//Insert form data into the database
$query = "INSERT INTO letters SET lgroup='$lgroup', lname=
Sure enough Kirk! That was it. Seems strange that you can set a
name/value pair on the tag, but they aren't used. Guess they
were just kidding ;-)
Greg
Greg Dotts wrote:
Sure enough Kirk! That was it. Seems strange that you can set a
name/value pair on the tag, but they aren
://downloads.php.net/edink/php-debug-pack-5.0.4RC1-Win32.zip
The PEAR bundles are ridiculously out of date for both PHP 5.0.4 and
4.3.11, where is the windows build pulling these versions from?
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ves have more information on
the (long and drawn-out) decision.
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--+--+
1 row in set (0.00 sec)
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
; DATE_ADD( NOW(), INTERVAL 5 MINUTE );
+--+
| NOW() < DATE_ADD( NOW(), INTERVAL 5 MINUTE ) |
+--+
|1 |
+------+
1 row in set (0.00 sec)
--
G
>
> }; // end if itemvalue
>
> }; // end of foreach
> ### code ###
>
> Is it possible to add a input box, where i can add ex: quantity of items and
> at the same time they can check the box? is it possible on my code?
It's possible, but what's the point of having a qty and a checkbox?
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
o fetch mail is fetchmail.
http://www.catb.org/~esr/fetchmail/
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Apr 10, 2005 10:59 PM, Teng Wang <[EMAIL PROTECTED]> wrote:
> If true, how can I uninstall php4.3.8 first and install php5.0.4 correctly?
You can remove your PHP4 rpms with:
rpm -qa | grep php | xargs rpm -e
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PH
$_POST[ 'username' ] );
echo "First Name: $name[0] Last Name: $name[1]";
> //echo "First Name: $fname; Last Name: $lname\n;
> echo "first letter is uppercase";
> }
> else
> {
> echo "first letter is not uppercase";
> }
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
urrently using php as a module , i know i can do it if ill use php as a
> cgi and limit apache with cpu usage , but wont it decrease dramtically my
> preformance?
You might want to look at mod_dosevasive.
http://nanoweb.si.kz/manual/mod_dosevasive.html
--
Greg Donald
Zend Certified Engi
w.jcxsoftware.com/vs.php
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Apr 11, 2005 5:06 PM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> I quit my last job in part because my "dev" server was a "live" box. Sheesh!
I have so been there before. Sucks.
Vmware, user-mode-linux, and Freebsd jails sometimes help in these situa
e driven PHP sessions.
ADOdb provides encrypted and bzip'd database driven PHP sessions if
you need that:
http://adodb.sf.net
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
W(), INTERVAL 15 MINUTE );
+-+---+
| NOW() | DATE_ADD( NOW(), INTERVAL 15 MINUTE ) |
+-+---+
| 2005-04-12 17:02:33 | 2005-04-12 17:17:33 |
+-+---+
1 row in se
d.conf?
AllowOverrides must be On for .htaccess files to work.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I am runnning php5 with IIS 5.1 and mysqlserver 4.1. The server works fine
> and mysql server is running ok.
Check your php.ini and make sure c:\PHP\ext is included in your
extension_dir paths.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http:
r the other. PHP is a server-side scripting language
not a client-side scripting language.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
seem to cut it,
> as returned widths are to small are long. Any ideas?
Google for 'font width calculator'. I've seen a few of them over the
years, mostly Flash or Java based.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www
public function __toString()
{
return '' . print_r( $this, TRUE ) . '';
}
public function __get( $key )
{
return isset( $this->$key )
? $this->$key
: NULL;
}
public function __set( $key, $value )
{
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Oops. Silly Gmail hotkeys.
What are you guys using instead of mysql_result() when using MySQL 4.1
and the 'improved' MySQL functions? mysql_result() went away and the
next best thing I can find is mysqli_fetch_array() with a little
iteration. Thoughts?
--
Greg Donald
Zend Certifie
I have searched for this in the FAQ's, News Archives and Googled for it
and cannot seem to find the answer. Please help.
I have a script that simply echo's a query string variable to the
screen. This works on a previously configured linux box with PHP4.0, but
not on a newly created Windows 2003 bo
get it done sooner than you think - honest!
How would a search and replace tool know which variables to
replace/change/convert or not?
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to pass a
session id around:
ini_set( 'session.use_trans_sid', 1 );
This works great until you get to where you need multiple load
balanced web servers.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
d_extensions();
if( in_array( 'mysqli', $extensions ) )
{
}
elseif( in_array( 'mysql', $extensions ) )
{
}
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/20/05, Jared Williams <[EMAIL PROTECTED]> wrote:
> Why not use PDO :)
Pacific Decadal Oscillation?
I'm stumped.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/20/05, Jared Williams <[EMAIL PROTECTED]> wrote:
> PHP Data Objects
>
> http://www.php.net/pdo
Sweet.. DBI for PHP.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
d.
MD5 collisions were found last year:
http://cryptography.hyperlink.cz/md5/MD5_collisions.pdf
Just a matter of time/cpu power.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
php_admin_flag register_globals 0
php_flag register_globals Off
is what I've always used.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ly my point.
It's similar to how a local root exploit sometimes evolves into a
remote root exploit once publicized and people begin working on it.
Disclaimer: There are only about 5 or 6 people in the entire world who
know anything about encryption.. and sadly I am not one of them.
--
//www.startvbdotnet.com/dotnet/languages.aspx
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/23/05, M Saleh EG <[EMAIL PROTECTED]> wrote:
> Anyone who passesd?
If I can pass.. well, good luck! :)
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/26/05, Lester Caine <[EMAIL PROTECTED]> wrote:
> I have had exactly the same problem with a number of
> home brew applications.
What's that mean, 'home brew' ?
The application seems very professional to me, even if it is free.
--
Greg Donald
Zend Certified E
equests from the $_REQUEST array.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/28/05, Clive Zagno <[EMAIL PROTECTED]> wrote:
> What templating engines do you use with php and why?
I use eval(). Because it works.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
an equation/algorithm
> that will round any number up/down to the nearest X.
#!/usr/bin/php
> ./round.php 499
500
> ./round.php 501
1000
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 4/28/05, Greg Donald <[EMAIL PROTECTED]> wrote:
> do {
> $num++;
> } while( $num % 500 );
Actually that fails for the base number 500. This works for everything:
#!/usr/bin/php
> ./round.php
0
> ./round.php 499
500
> ./round.php 500
500
> ./round.php 501
On 4/29/05, Skrol 29 <[EMAIL PROTECTED]> wrote:
> It would be like calling Notepad / VI / TextEdit "Html Editors".
HTML is text.. so any text editor is an HTML editor by default, including vi.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General
HP to build up my HTML and
then output it at the very end of the script. I use heredoc syntax
almost exclusively. Seems very clean.
Drives me insane to see HTML with stuff like all through it.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http:/
#x27;][$i]['extension']
setting.
> which config files are responsible for loading mysqli in apache/php5 ?
The mysqli support in my PHP is built in using --with-mysqli during
the configure. You can also load the extension in the php.ini or with
the dl() function.
--
Greg Donald
Zend Cer
ite something like this:
>
> @list($first, $second) = $array;
I go with $array[0], $array[1] and such. Or maybe
while( list( $k, $v ) = each( $array ) )
{
}
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
] appart. I tried several things but doesn't work.
Put an .htaccess file in the media/ directory that says RewriteEngine off.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ed!!
You need to evaluate each of the possible return values for
$_FILES[ 'archivo' ][ 'error' ]
http://php.net/manual/en/features.file-upload.errors.php
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
any help mates
You can add something like this to see what is coming through when you
post the form:
echo '';
print_r( $_REQUEST );
echo '';
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ile type header() based on the file name's
extension, then send the data.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, and their 'test' mode leaves much to be desired.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/6/05, Dan Rossi <[EMAIL PROTECTED]> wrote:
> is there a way in the meantime to compile
> extensions and load them dynamically without the need for root access
> to some of the php libraries ?
You can compile/install extensions anywhere and load them with dl().
--
G
tered the art of variable
> replacement, but how would one go about adding support for if {}
> statements as well as loops. I'm a little bit lost when it comes to
> this.
eval() will parse your PHP code. I use that with filemtime() for my
own simple templating/caching system.
--
G
On 5/10/05, balwant singh <[EMAIL PROTECTED]> wrote:
> is there any method to know whether the other webserver is running or not.
There are lots of methods:
system( 'telnet hostname 80' );
fopen();
fsockopen();
Curl.
--
Greg Donald
Zend Certified Engineer
http://de
On 5/10/05, Blair Lowe <[EMAIL PROTECTED]> wrote:
> Crackers will typically knock out php
Did you have some statistics or is this just your own experience/assumption?
I may as well switch to mod_ruby if they attack mod_php more often than not.
--
Greg Donald
Zend Certified Engi
mode_exec_dir no valueno value
> Have somebody experience in this problem?
Is it possible your mod_php is using a different php.ini than your cli php?
I use system() instead of exec(), I find it's rare than I don't want
to capture the resulting output of my commands.
--
be wrong but I doubt the class file is changing so much so
often that you need a realtime include() like that.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ht exec() only took a single argument.
That 3rd argument will come in handy now that I know about it. Learn
something new everyday. :)
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/12/05, Sam Smith <[EMAIL PROTECTED]> wrote:
> Any recommendation for the easiest credit card gate way for PHP running on
> FreeBSD?
>
> Authorize.net?
That's my pick.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (
ll I see in the site menu
is a link to the encoder. Sorry if I'm just not seeing it.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/18/05, Rob Agar <[EMAIL PROTECTED]> wrote:
> because remembering
> to hit reply-to-all gets on my nerves too..
It's fairly painless once you get used to it.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To u
rtification.php
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/23/05, Sebastian <[EMAIL PROTECTED]> wrote:
> I'd like to know if it is possible to perform a search across multiple
> mysql tables within a single query.
http://dev.mysql.com/doc/mysql/en/union.html
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--
PHP Gen
that would add more functionality to it if possible...
Why reinvent the wheel?
http://pear.php.net/packages.php?catpid=7&catname=Database
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> or
>
> echo str_repeat( "\t", 5 );
Remove all whitespace from the final HTML, then all this doesn't matter.
function cleanFinalOutput($html){
$return = eregi_replace("\n", "", $html);
$return = eregi_replace("\r", "", $r
and carriage returns. It
does not remove space characters. Your example seems to be the dangerous
one.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s would mean additional processing and
> replacements seems to be resources consuming sometimes...
Works for me. Feel free to not use it.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t;, "", $return);
> > }
>
> Not to be too pedantic, but you could probably reduce the above
> to a single line function:
>
> function cleanFinalOutput($html){
> return eregi_replace("\n", "", eregi_replace("\r", "",
> ere
On Thursday 15 April 2004 12:21 pm, Jorge Oliveira wrote:
> I use spaces for php code and tabs for html.
And the point of doing that is?
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
long time without any issues.
View my efficient single line of html source code: http://destiney.com/.
All the styles and javascript work fine. HTML parsers don't give a rats ass
about newlines, tabs, and carriage returns so why have them.. Makes the
output easier to compress as well.
--
G
bout it :) There is no
> "right or wrong", it's down to personal preferences.
Well at my shop more efficient = right and less efficient = wrong.
--
Greg Donald
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thursday 15 April 2004 01:38 pm, John W. Holmes wrote:
> Certainly don't need to fire up the regex engine.
>
> return str_replace(array("\r","\n","\t"),'',$html);
Sweet, didn't know you pass it an array. Thx!
--
Greg Donald
[EMAIL P
Richard Davey wrote:
Passing a potentially huge string through a replacement function for
every single page doesn't really = efficient in my shop. YMMV.
We use Turke MMCache so it's not every single page.
Besides that CPUs are way cheaper than bandwidth.
--
Greg Donald
[EMAIL PROTECT
rowser.
A buddy of mine created a secure sessions tutorial that protects against
this exact issue. He has a fantasy stocks site and needed to protect
against session hijacking.
http://tutorials.dotgeek.org/tutorial.php?action=view&id=58
--
Greg Donald
[EMAIL PROTECTED]
--
PHP Gener
601 - 700 of 1454 matches
Mail list logo