is there a way to add a php script (file) in cron for running this script every ten minutes or at a scheduled time?
cause i want the user to be able to schedule when to send newsletter to a lot of emails he choses.
so i have to create a cron job from php to run a php file on that scheduled time.
is this possible if you have a shared w...
I'm building a website that needs to support different language translations. I have strings in PHP, JavaScript and Smarty Template files that need to translated.
I want to use something like PHP's gettext() function and have a single language file for each locale.
This is easy when the translatable strings are in the PHP files but I ...
I have been asked to include some html snippet in this php/smarty page. It's basically a sales agreement at the end of an overview page before you pay.
What is the code to include static html into my php/smarty template?
Thanks...
...
Morning y'all
This is probably an easy one but I barely got any sleep last night and am struggling to comprehend anything.
I've got a CodeIgniter library I've made called Points.php. Here's the contents of Points:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Points
{
function __construct()
{...
Hello.I have a page "index.php" where i have a link called "add_users.php".In "add_users.php",i accept user information and come back to the same page "index.php" where information comes through post action and gets inserted into the database.When i refresh the page orhit back button,resend box appears.I went through many solution where ...
Hi there, I posted a question yesterday, which I intend to get back to today however I wrote some JavaScript as a first line of prevention against XSS. However when testing this on my live server I catch some invalid input as the javascript catches the php section. My form uses post and php isn't in my form items (i haven't typed it in)....
Hi,
Its my 1st App using ZF. As our client requirement i have made separate admin and front panel. Without using Zend_Acl. I have problem when session expires it always takes me on front end log in page . I have tried to solve it by session but it's using single session for both admin anf front panel. I there any way so i can create sep...
hi, I currently have an index.php file which allows me to output the list of files inside the same directory, the output shows the names then I used filemtime() function to show the date when the file was modified. my problem now is, how will I sort the output to show the latest modified file ?, I've been thinking for awhile how to do th...
hamming('10101010','01010101')
The result of the above should be 8.
How to implement it?
...
Hello, I would like to monitor my program which is running on the web server.
Can I draw the progress bar or simply show the percentage which is returned by my code?
The php script is spawning the external code with parameters.
$Status="rendering...";
$cmd = "cd $rpath && $envopts /home/arm2arm/bin/sph2grid";
$shellcmd=$cmd.$params.'...
Hello,
I must warn you, this code will hurt your eyes, so please don't judge me, i'm trying to improve the way I handle errors
all my tests are like this :
if ($something < 27)
{
$error_IP= '<div class="error_message">something bad</div> ';
}else{
$erreur_IP='';
}
and here's the ugliest thing :
if( !isset($_POST) || ($erreur_captc...
+2-1+18*+7-21+3*-4-5+6x29
The above string is an example of the kind of string I'm trying to split into either a key => value array or something similar. The string is used to represent the layout of various classes on a three column page of an intranet site, which is editable by the user via drag and drop. This string is stored in a c...
Hai
I am using codeigniter...I my function phpcalview()...
This is my function
function phpcalview()
{
$year = $this->input->post('yearvv');
$data['year'] = $this->adminmodel->selectyear();
$data['date'] = $this->adminmodel->selectmonth();
print_r($data['date'] );
$this->load->view('phpcal',$data);
}
I am printi...
Array ( [0] => Array ( [OPT] => 65 ) )
how to get 65 to a variable in PHP
help me please....
...
Hi,
I'm running a select that returns alphanumeric results, e.g:
ABC-1
ABC-2
ABC-10
SAM-1
SAM-2
SAM-10
SAM-20
I've tried using:
ORDER BY CAST(mid(field_name, 6, LENGTH(class) -5) AS unsigned)
and
ORDER BY filed_name + 0 ASC
this has helped put some order but I cant seem to order -2 before -10
many thanks
...
I have a function that I use on index.php page and I would like to call it from other php page (other.php). How to make this function available without redeclaration? I think it's achievable using sessions, but I am not sure how to do it exactly.
Th problem is that it works in index.php, because it uses some API declaration, but it doe...
So I opened the cache floodgates in my Cakephp app and now I want to close them...
I've done pretty much everything I can: delete all files in the tmp folder (but not the folders), turned 'Cache.disable' on in the core.php file in my app, have tried clearing the cache from within some controllers with clearCache() and Cache::clear() (bu...
Does anyone know of a way to parse the contents of the apache DirectoryIndex directive (in httpd.conf) using PHP?
...
How can i delete/drop entire keyspace using php: cassandra :thrift
...
I want to only let "right" people watch those videos. In other words, only registered users that are allowed (by other users, ie, friends) should see videos. I have a hard retriction for cpu usage in my shared environment, so I can't use things like php's readfile.
...