Does any one knows why while loop below ends after few loops when it meant
to keep in loop?
File name: while_loop_script.php
define('run', 0);
define('START', 10);
while(START run){
$ch = curl_init(mydomain/update_script.php?action=run);
curl_exec($ch);
curl_close($ch);
}
using
setting:
max_execution_time = -1 ; Maximum execution time of each script, in
seconds
max_input_time = -1 ; Maximum amount of time each script may spend
parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 2036M ; Maximum
Please how can you run a timed php script file via window scheduled task. or
how can u execute a php script on a a time interval for instance every
4minutes
hi Andrew,
first schedule a task, locate and select your php.exe, and schedule it
to run daily for the moment.
after creating it, you
Hi all,
Another question:
If a script starts to perform an operation and the user browses away will
that terminate the thread perfoming the operation eg. the operation is
aborted ?
Mvh
Toke
the script is aborted as soon as server gets no response from the
browser when it sent output
In all the servers i had tested my system i dont have any problem, but in
this server the apache are displaying to me the error 500 Internal Server
Error.
Someone can say tome what is wront with my .htaccess?
RewriteEngine On
IfModule mod_rewrite.c
RewriteCond %{REQUEST_FILENAME} !-f
Hi all,
Another question:
If a script starts to perform an operation and the user browses away will
that terminate the thread perfoming the operation eg. the operation is
aborted ?
Mvh
Toke
the script is aborted as soon as server gets no response from the
browser when it sent output to
Well well I forgot to install Smarty, but show the message. Ididn't modify
Smasrty.class.php. And index.tpl in libs directpory don't exist only the
file in root.
Anybody Can save me? I'm X confuss. All is new for me.
Warning: Smarty error: unable to read resource: index.tpl in
Hi all.
I'm writing a script that accepts several different forms with different
content. Depending on what data is sent with the form the script will do one
or the other think.
Before the form data is processed I'd like to scrub it of HTML tags.
I can do this manually as below but the
I miss the utility to do stuff like that ... seriously ... but in any case:
?php
echo ($f = 'str_replace') ? $f(a, b, aaa) : null;
?
where echo is optional.
Regards
you mean this
?= ($f = 'str_replace') ? $f(a,b,aaa) : null; ?
virgil
http://www.jampmark.com
--
PHP General Mailing
Ok so, I have an array
[0(index)][1st key][2nd key]
Basically I don't care about the index. As a matter of fact I'd prefer it
reset to still be in order afterwards.
However, I need to sort the 1st key and keep correlation w the second key.
Then sort on the second key.
I have video
Dunno why you guys started talk about utf-8 problems, he has a list of
ids
which should contain only unsigned integers, otherwise I do not get how
that
query could work with an implode(',', $whatever) rather than 'id in
('.implode(',', array_map('mysql_real_escape_string', $whatever)).')'
Hi there!
Any know how Can I use PHP code into Smarty Temple Engine (TPL files) ?
I usued {php} include(text.php); {/php} but the code don't run simply
output the code.
What's the problem? Wht don't run?
Thankx,
Luciano Felli
it may be the file path.
try echoing something before the
Thanks,
I downloaded Netbeans week or two ago and I found all that. I thought there
is
something more advanced (these things have any decent editor/ide (for
example
eclipse + pdt also have all that)). We are talking completely different
level
of checks :-) In the end I may switch to
As a matter of fact DANIEL ...I AM A REAL PERSON !
You know, I really hate it that people like YOU reply back to me with your
self-vain - self-important attitudes - and act like no one else on the F-ing
planet has the right to live or even share the same air you breath
YOU
if( !function_exists('clean_sql_term') )
{
function clean_sql_term($term) {
return $term;
}
}
beautiful
hi Nathan,
Nice find.
You have found a very useful function.
Here is how I use it to load needed PHP files that declares the function.
if
The for loop iterates through each field of each line, the while loop
iterates through each line. Move the br / out of the for loop, right
before the end of the while loop as follows:
?php
$row = 1;
$handle = fopen(try3.csv, r);
while (($data = fgetcsv($handle, 1000, ,)) !== FALSE) {
Hi there,
Well, after reading the post about so called experts and licensing
programming, I
can say that I sure am not licensed or even remotely close to a novice PHP
programmer, just a ‘lil ole PHP beginner trying to get my web page set up and
learn a few things. I’m not sure if I am
in
I hate asking for help with simple code like this because I can usually
figure it out, but I'm stumped on this one. I'm getting a parser error on
line 13, whether I comment out the require_once line or not. Can you help?
?php
require_once('twitterlib.php');
Trying to find best way to accomplish following scenario. Looking to search
inventory through a POST form, have the following optional fields to search
by: Product Name, Color, Size, and Status. Search maybe for the Product
Name and/or Color or they may search for just the Color or all 4
I typically do something like this:
$data_sql = mysql_real_escape_string($data, $connection);
$query = insert into data(data) values('$data_sql');
$insert = mysql_query($query, $connection);
if (!$insert){
trigger_error(mysql_error($connection), E_USER_ERROR);
}
My custom error handler
hi Chris,
basing on the code you posted, you're missing the closing brace for
if ($accessToken===NULL)
{
there should be 3 closing braces before the last ?
That'll be the next error, but that error would print unexpected
$end on line xxx.
well, if you're getting the parse error
Usually a single transaction is faster than an insert a time (with or without
union)
Hi all,
I am inserting more than 5000 rows into sql database but its taking more
than 30 mins to get it all the data inserted. I use union to insert
multiple rows of 20 at a time.
What is the best way
Hi Virgil,
After your last post here, I looked at your site, then the Smarty site.
That was what triggered this question. Templates are a black art to me.
I don't even know where to begin to understand them. Every reference I
have looked at so far assumes that I already understand the MVC
On Fri, Mar 20, 2009 at 6:47 PM, Pierre Lilliman lilli...@live.com wrote:
I have been using same program for some (not very long time), and I find it
very useful, although it has some annoying things (inability to work with all
kinds of include expressions). Still I think every serious PHP
Hello,
I have just hired a remote PHP programmer. His main job is web
development and applications.
I have few concerns, I would be happy if someone can point me to the
right direction.
1. How can I provide him the requirements. I mean how can I analyze
the site and put everything in
I have a program where I process more that 5000 list of 100 data at time
but it very slow due to many *for statement*s. how you make it run faster
code for statements to use a variable or contant for testing in every
iteration like below
for ($i = 0; $i 100; $i++) {}
also try to optimize
That looks nice, but how do I get to the point where I can understand
how to use it?
I have also looked at the Smarty site http://www.smarty.net/, but
their documents assume significant experience in building and using
templates.
Where can I find guidance or tutorials on how to do all of
Does anyone have a good link to something like this for reasonable
price or free?
Configurable meaning skinnable and sizeable?
Something Ajaxy would be cool but it would need to save state like the
facebook IM feature on their site.
Thanks, T
here is a good list of free scripts
Hi list,
Just wanna share my collection of Smarty scripting tips and techniques.
Smarty is a template engine for PHP that you can use to separate data
and logic from web design.
This way programmers can work on the php scripts and designers can
work on the templates for the same web site.
Here
1. What is the overhead on preg_replace?
it really depends on your operation. when you think it can be done
using str* functions then go for it as they are much faster than preg*
functions.
2. Is there a better way to strip spaces and non alpha numerical
characters from text strings? I
*Handling (very) large files with PHP*
Hello, I am planning a project in PHP, and I have few unsolved issues that
I'd like you to help me...
The project will start by loading a file of about 50GB.
The file has a many objects with a pattern, for example,
Name: Joe
Joe likes to eat
Hi,
I wondering what is the difference between include(), and eval('
?'.file_get_content().' ?php ')?
If there is something I should be aware, please, let me know.
Use include since it allows a cache like eAccelerator or APC to work.
Eval never gets cached. Also, include let's the engine
filtered schreef:
Hi,
we have script containing
? echo $_GET['studio'] ?
let say I do:
example.com/yourscript.php?studio=script type=text/javascriptalert('I am
an evil haxor');/script
excusing the fact that the query is not urlencoded, what happens on your site
(replace domain and
Hi all,
I wrote a PHP script running in Apache which takes more than 30 seconds to
complete. It uses set_time_limit() to extend the time it is allowed to run.
The script generates thumbnails from a list of images. Upon completion, the
script redirects the browser to another page using HTTP
I'm working on learning php and have been toying with includes, and I am
trying to figure the advantages/disadvantages to using them.
I know that using them eliminates the need to put the files once altered
as with a template, however, is that the only advantage.
My particular concerns are
Hi,
I have a question regarding using line breaks in PHP. I have the code
something like:
echo 1 . \t . $x . \t . $y . \r\n;
When I run the code, it looks like a whole blob of text, but when I use View
Source, the line breaks are formatted then correctly.
Anyone can please tell
I want to index the files on a website recursively. The program will
run
in
the site root
directory, which GETCWD reports as D:/Websites/Website_1. I can open
any
file in the root
directory simply using its file name; Joe.dat, for example, and I can
opendir for any
Hi,
my php program does not display current result of submitted form
instead the previous content is shown until you refresh manually
(which means resubmitting the form).
Can someone help me out because, I want to display the result of the
latest form result and not the old one.
I am
I am using a WAMP server for my coding purposes. My MySQL Version is
5.0.51b, PHP version is 5.2.6 and Apache version is 2.2.8
I have created a database with one of the tables containing a location of
the image. Using PHP I am trying to retrieve the location of the image (from
the mysql db)
I am using PHP to build an XML file, but I keep on getting an XML
error when open the file in Google Chrome.
-
This page contains the following errors:
error on line 30 at column 318: Entity 'iuml' not defined
my php program does not display current result of submitted form
instead the previous content is shown until you refresh manually
(which means resubmitting the form).
Can someone help me out because, I want to display the result of the
latest form result and not the old one.
I am
m...@hallmarcwebsites.com wrote:
@todd; Micah - Precisely why I presented the question anew. Not only do I
not have enough time to troll through the archives; I was looking for a
fresher set of responses based on today's smorgasbord. Thank you for your
input; I have looked at both YII and
Some languages allows to bit-pack structures to save spaces. Since PHP
doesn't have native set data type and operations, will array of booleans be
optimized as such? If not, how can I achieve the same result? I need to save
about 200 boolean values and I guess it's a good idea to use bitsets.
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
I'm submitting a url like this:
http://mysite.com/index.php/alfa/bravo/charlie/delta
The index.php calls has code to decode the url segments
(alfa/bravo/charlie/delta). It determines that the controller is alfa,
the method is bravo, and converts charlie and delta to $_GET['charlie']
=
Recently we had some serious discussion on local boards.
I prefer calling PHP as Web Framework of C and C++
if you had a time for this fruitless discussion. Please send your opinions.
PHP is a server side scripting language for the Web using a C like
language structure and conventions. The
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root), like:
/graphics/my_portrait.gif
Or you can include the
I want to enable error messages while I'm testing or developing.
I use php 5.2.4 on ubuntu server.
These two lines does only print notices.
?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?
When I make something wrong like syntax error; I get blank pages.
Is there
I have secured the login form for my CMS with a challenge-response thing
that encrypts both username and password with the
(login-attempts-counted) challenge (and; here's my problem: a system
hash) sent by the server (it would end up in your html as a hidden
inputs, or as part of a json
Hmm, I'll try taking down the optimizer and seeing if it segfaults or
not. If that's what it is it's a crying shame that apc and
zend_optimizer can't get along.
maybe give eaccelerator a shot, i believe theyve got an optimizer in there.
im not sure how it stacks up to zend's, but it
Sorry all, I was testing in a Windows environment.
I feel like an idiot... :)
Thanks to all.
--
m a r k u s
Bruno Fajardo wrote:
Assigning the return of file_get_contents to a variable?
Didn't get your point...
2009/2/13 m a r k u s queribus2...@hotmail.com
Shawn McKenzie wrote:
I'm scripting a light-weight, low volume signup registry for a running club.
Folks sign up to volunteer for events and the like. There will generally be
a handful of signup registries at any one time. A typical registry will only
contain 50 to 100 names. Each registry is only in existence
While PHP has a lot of nice features, it also has some traps which I am
forever falling
into. One which I find particularly hard to understand is how mixed mode
comparisons work.
For instance
$string = 'elephant';
If($string == 0) returns true;
If($string != 0) returns false;
I need simple CMS sistem that I could use as a staring point (to save some
time in setting up the structure) in developing my own CMS. The code
should be simple to understand so that I can easily get on and start
building on it. It would be of great help if it already had features like
http://coolepochcountdown.com/
On Fri, 2009-02-13 at 13:34 -0500, TG wrote:
http://timestamp1234567890.com/
Happy cool epoch 1234567890 day!
virgil
http://www.jampmark.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Java is really awesome at OOP and it is great for teaching OOP or,
shall we say illustrating OOP.
OOP is a programming technique in general without any bias towards any
programming language.
Good background on OOP concepts is essential in learning language
specific OOP implementation.
So don't
Hi all,
I consider myself quite good with Regular Expression, but i could never find
out how to match something like:
match this but not this and that
so i would like to match the first match this (or another this) but not
not this.
Seems pretty straight forward but i haven't found a
My problem is very simple:
I have an object that's definately called with every page request.
It's pretty much the same for every unregistered/anonymous user.
And it's not small. Alot of attributes are being set from DB queries etc.
Now my idea was to do some sort of caching with PHP to
Last year I began to sepearte my module files to many files for their
purposes.
Last time use use lots of dirs for their types
someting like
controllers
a.cont.php
b.cont.php
definition
a.def.php
b.def.php
models
a.model.php
b.model.php
views
a.view.php
b.view.php
Then
59 matches
Mail list logo