Marco J.L wrote:
> Hello,
>
> how can I change the lenght of an value in basuc it's called LEFT or
RIGHT
> and MID . I read the filenames but I want to strip the extension from
the
> filename.
>
> SCRIPT ==
>
> $handle=opendir('news');
> while (false!==($file = readdir($hand
when running a simple php script, below, with exec, I recieve:
sh: /whoami: No such file or directory
Thanks very much,
cole
mailto:[EMAIL PROTECTED]
"MMS " made the following
annotations on 04/06/2005 05:37:11 PM
--
> when running a simple php script, below, with exec, I recieve:
> sh: /whoami: No such file or directory
>
> // outputs the username that owns the running php/httpd
> process // (on a system with the "whoami" executable in the
> path) echo exec('whoami'); ?>
>
You may want to try using the f
Hi All,
I am using PHP on Apache/Linux with mod_php4. I need to implement a
lazy cache for some resource which should be updated say every 1 hour
in a way that the first person who arrives after an hour will be
updating the cache. As you can imagine, I need to implement a write
lock in this case,
Ryan A wrote:
Hey James,
I've actually decided to go with FudForum as it has a lot of features and
everything that this project requires...and some that it does not :-), but
since its open source and free I cant really complain, once i get paid I
plan to donate a few bucks to support the project.
I
Hey fellas, I'm makin a forum right now and as a sub project, I'm making
a template engine / class. Right now all it does is variable
replacement, however I am curious as to how I can implement support for
loops and if statements. I would appreciate any ideas that you may
have, thank-you!
Che
Jakob Goldbach wrote:
> Hi,
>
> What happened to all the pear packages that were in 4.3.10 ?
>
> I don't see this change in the changelog :-)
>
> $ tar ztf php-4.3.10.tar.gz | grep tar | grep pear
> php-4.3.10/pear/packages/HTTP-1.2.2.tar
> php-4.3.10/pear/packages/Net_Socket-1.0.1.tar
> php-4.3
On Wed, April 6, 2005 7:04 pm, James Williams said:
> Hey fellas, I'm makin a forum right now and as a sub project, I'm making
> a template engine / class. Right now all it does is variable
> replacement, however I am curious as to how I can implement support for
> loops and if statements. I woul
Richard Lynch wrote:
On Wed, April 6, 2005 7:04 pm, James Williams said:
Hey fellas, I'm makin a forum right now and as a sub project, I'm making
a template engine / class. Right now all it does is variable
replacement, however I am curious as to how I can implement support for
loops and if statem
Hey,
I was just wondering which is the best/most efficient way of having language
files for a site?
eg:
if $lang=english then it should include lang.en.inc.php
if $lang=swedish then it should include lang.se.inc.php
etc
One way I did it before was to have an array like so:
$lang_en[0]="Enter user
Ryan A wrote:
Hey,
I was just wondering which is the best/most efficient way of having language
files for a site?
eg:
if $lang=english then it should include lang.en.inc.php
if $lang=swedish then it should include lang.se.inc.php
etc
One way I did it before was to have an array like so:
$lang_en[0]
On Wed, April 6, 2005 10:07 am, Saswat Praharaj said:
> I need some help in searching string in a file.
>
> My requirement is to search the string,append something to the string .
> Write the string back to the file without changing other parts of the
> file.
>
> e.g
> Suppose I have the following
a parser is a program that i will take some preformatted text, extract
the information from it, and then do work with that information. xml
programs users parses to pull data from between the <> tags.
in your case, you'd have to have some sort of declaration in your code
that sets apart code block
On Wed, April 6, 2005 9:14 am, Eric Gorr said:
>> "Duncan Hill" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>>IE dropped support (or severely neutered it) for username:password in
>>> URLs
>>>a
>>>while back.
>
> If anyone is interested, I found this document which appears t
Thanks everybody, but is this not already a really simple parser?
class tpl {
//
// USER ACCESIBLE VARIABLES
//
//
// PRIVATE CLASS VARIABLES
//
var $_template;
//
// USER DEFINED VARIABLES
//
var $tpl_directory; // REQUIRED - LOCATION OF THE TEMPLATES
var $var_brace
On Wed, April 6, 2005 6:09 am, Ryan A said:
> when the user gives me a number, i have to check if its in the array and
> delete that entry...how do i do that?
> I have looked at the manual but have gotten confused with array
> pop,splice,array_key_exists etc
http://php.net/array_search
http://php.
Does anyone use it, is it more efficient on the compiler and coding to
do this
switch($i):
case 0:
break;
endswitch;
instead of this ?
switch($i) {
case 0:
break;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
Hey,
Glad that you replied coz you would have had more experience with this than
the average php joe being the author of a forum.
Isnt your approach a lot like this one:
> $get_user="Enter your username:";
> $get_pass="Enter your password:";
except that you are using arrays?
have you ever doubl
Cabbar Duzayak wrote:
Hi All,
I am using PHP on Apache/Linux with mod_php4. I need to implement a
lazy cache for some resource which should be updated say every 1 hour
in a way that the first person who arrives after an hour will be
updating the cache. As you can imagine, I need to implement a writ
On Wed, April 6, 2005 4:23 am, Duncan Hill said:
> I have a snippet of code that looks something like:
> if (is_array($p_sub_values)) {
> foreach ($p_sub_values as $i => $v) {
> $p_sub_values_str[$i] = "'$v'";
> }
> $s = join(',', $p_sub_values_str);
> $r =
On Wed, April 6, 2005 3:34 am, Å£À¤ said:
> I've got some swf file to be tested their size with php.
> But it worked on some of the swf files. Some don't.
> I wonder if someone could tell me why.
> Any help will be appreciated:)
> Thanks in advance.
For the ones that don't work, put them up somewh
On Wed, April 6, 2005 1:59 am, [EMAIL PROTECTED] said:
> I'm having problem with my session, when I login my session is registered
> ok but
> when I click on another page it's canceled again.
> I use that kind of link:
> index.php?menu=voyage&sid=$sess_id
>
> then on top of the page I use:
>
>
> if
I would use a cronjob to make the entry rather than a user, why let the poor
guy wait for you to create the content
You may have 2 requests both trying to
create the new cache entry, but that is much cleaner than having to deal
with locking. Do a tempnam() to get a temp file to write to and the
On Wed, April 6, 2005 1:47 am, William Stokes said:
> I need to test if a variable value is 3 or 6 or 9 or 12 or 15 or 18 ...
> goes
> on like this.
>
> How this can be done?
To be pedantic, in addition to using % (modulus) operator, you'd want to
check:
$x > 0
in order to rule out 0, -3, -6, -9
Richard Lynch wrote:
On Wed, April 6, 2005 9:14 am, Eric Gorr said:
"Duncan Hill" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
IE dropped support (or severely neutered it) for username:password in
URLs a while back.
If anyone is interested, I found this document which appears to prov
On Wed, April 6, 2005 1:29 am, Thomas Franz said:
> is there a way to download a set of files at once, without zipping them.
No, not really.
> I want to offer my visitors to select several files for download. Now i
> don't know how i can handle the download at once.
I guess you *COULD* do someth
On Wed, April 6, 2005 12:00 am, [EMAIL PROTECTED] said:
> Hi to all,
> I've wrote a program with a web-browser interface (IE) and
> a built-in server (INDY) which call the php-cgi.exe CGI application
> and redirect stdio/stdout/sterr to pass .php scripts readed from
> a crypted and zipped sets of f
On Tue, April 5, 2005 11:41 pm, Kim Madsen said:
>
>> -Original Message-
>> From: Jay Blanchard [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, April 05, 2005 3:42 PM
>
>
>> > having apache be the groupowner doesn´t change anything
>
>> You may also need to change the user/owner, depending on w
On 4/7/2005 5:19:24 AM, [EMAIL PROTECTED] wrote:
> On Wed, April 6, 2005 6:09 am, Ryan A said:
>
> > when the user gives me a number, i have to check if its in the array
> and
>
> > delete that entry...how do i do that?
>
> > I have looked at the manual but have gotten confused with array
>
> > po
On Tue, April 5, 2005 10:23 pm, Joey said:
> OK I am migrating some sites from an old school server to one with MySQL 4
> &
> newest PHP, however certain things aren't running because of the
> register_globals variable on the new server is set to OFF for security
> reasons.
>
> What I am trying to
On Wed, April 6, 2005 8:21 pm, Dan Rossi said:
> Does anyone use it, is it more efficient on the compiler and coding to
> do this
>
> switch($i):
> case 0:
>
> break;
> endswitch;
>
> instead of this ?
>
> switch($i) {
> case 0:
>
> break;
> }
The alternative syntax, as far
On Wed, April 6, 2005 8:07 pm, James Williams said:
> Thanks everybody, but is this not already a really simple parser?
I dunno what a CS Major would say, even though I was one, once upon a
time, but I'd say "No."
I don't call it a parser until you start tearing apart the text, and
making decisio
On Wed, April 6, 2005 7:52 pm, Ryan A said:
> I was just wondering which is the best/most efficient way of having
> language
> files for a site?
I can't really speak to this, as I've never gotten around to
multi-language support, but this always looked like a winner to me:
http://php.net/gettext
Just make your template engine compile templates to "native" php code.
i.e. write a parser which replaces {if $foo}{$var}{/if} with
templateVars['var'];?>
To check if the template must be recompiled, just compare filemtimes.
The assign function could be look like this then:
=
function assign($
Lars B. Jensen wrote:
I would use a cronjob to make the entry rather than a user, why let the
poor guy wait for you to create the content
You may have 2 requests both trying to
create the new cache entry, but that is much cleaner than having to
deal with locking. Do a tempnam() to get a temp fi
Hello,
on 04/06/2005 10:56 PM Cabbar Duzayak said the following:
I am using PHP on Apache/Linux with mod_php4. I need to implement a
lazy cache for some resource which should be updated say every 1 hour
in a way that the first person who arrives after an hour will be
updating the cache. As you can
Jay Blanchard wrote:
[snip]
I wouldn't lose sleep over it. I think the people here at work are
actually making fun of me when they 'changed my title'. Maybe it's
because at almost 40, I still collect comic books, and watch Star Trek.
:o
[/snip]
Well, I'm between 45 and 50 and still collect foo
Hi
Just out of curiosity, if you write your PHP under an open source
licence, how do you hide the codes to get into your database?
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
101 - 138 of 138 matches
Mail list logo