Hi Friends,
here is the part if having error.
Fatal error: Using $this when not in
object context in
/pb_events.php
on line 6
line 6 is: $jpp = $this->vars->data["jpp"];
function DoEvents($this) {
global $_CONF, $_PAGE, $_TSM , $base;
$jpp = $this->vars->data["jpp"];
$cache["departments"] = $this->db->QFe...
I have an indexed array which I've generated from an associative array with this code
$index_arr = array();
foreach($assoc_arr as $key => $val ){
$index_arr .= $val;
}
when I print it with print_r($index_arr); it works fine. But when I try to print it with foreach I get an error "Invalid argument supplied for foreach()"
foreach($i...
I'm developing an online store with Magento. The site will be high traffic and will need a two server setup, Testing and Production.
My question is how do online stores, specifically Magento handle this?
The idea I had is:
Take Production site offline
Empty Testing database
Copy data from Production database. (Maybe )
Test
Copy file...
My <title>The title</title> is based on my headline which can contain extended characters which I store as html entities &#xxx;
How can I easily turn these into real characters to make the browser window display them correctly or get them to appear correctly in their current form?
...
If i send four POST variables, but the second one I dont know that the name="" tag will be; how can I access it? Can i use $_POST[1] or not?
...
I recently discovered that a sql query that was running fine earlier is now timing out after 60 seconds and throwing an error. The query is slow but runs as part of a nightly job so that's not a problem in itself (so please don't suggest I optimize it).
I'm able to reproduce the error consistently by running "select SLEEP(120);" from P...
I'm looking for a PHP library that allows me to scrap webpages and takes care about all the cookies and prefilling the forms with the default values, that's what annoys me the most.
I'm tired of having to match every single input element with xpath and I would love if something better existed. I've come across phpQuery but the manual is...
Hello All:
I am trying to send json string to the server using jquery ajax, as below. It decodes correctly when GET is used, but does not work when POST is used. Any suggestions?
$.ajax({
type: "GET",
url: "../pssops21/php/insertTempTransData.php",
data: 'data=' + strSelectedItems,
dataType: 'json',
async: false,
success:...
Okay, so I am basically making a script to pass post data using cURL. Using my previous example in another question, I will be passing my ever growing list of phone numbers. However, I can only submit 20 phone numbers a day at the max. So how can I make a check point for my script to find out where it last stopped (which phone number was...
I would like to know what's the best way to organize my php project with ajaxActions files.
At the moment I have a few ./process/ajaxAction_pagename.php files containing my actions like this:
if ($action=="actionName")
{
//code
}
I'm just wondering if there is a better (or more standard) way to do it.
...
I am trying to display the classic breadcrumbs on a WP based site. I have the following function,
//breadcrumb function
function the_breadcrumb() {
if (!is_home()) {
echo '<a href="';
echo get_option('home');
echo '">';
//bloginfo('name');
echo 'Home';
echo "</a> > ";
if (is_category() || is_single...
$sock = fsockopen($url_parts['host'], (isset($url_parts['port']) ? (int)$url_parts['port'] : 80), $errno, $errstr, 30);
if (!$sock) return false;
I have list on my db for urls, that I am visiting, and occassionally I get this:
I am getting "Fatal error: Maximum execution time of 30 seconds exceeded..."
Its expected, since it goes to ...
php odbc_connect not connecting with sybase database.
I set up a web site using php to talk to a sybase db (already in use for a in-house application) via a odbc connection, so users in the field could access the in-house db. This was on a 2003 NT server, and everything worked fine.
Then I set up a similar site on an XP Pro machine (t...
Is it it possible to do this in php?
Javascript code:
var a = {name: "john", age: 13}; //a.name = "john"; a.age = 13
Instantiate the stdClass variable on the fly ?
...
I am getting expected notices and warnings, and would like to turn them off on my php file. errors are:
Warning: fsockopen()
and notices are:
Notice: A non well formed numeric value encountered in
I am planning to use cron for this php script, and do not want to get any errors or notices logged anywhere... ie cpanel error log etc...
...
Eventually, I'm creating a website on three languages: english, russian and chinese. I hope that if I use UTF-8 in application and database, there won't be any problems with input-output (will there?)
But the most frightening part of it is a search. It should be cool enough. It should be full-text, it should index, etc. I hope it will u...
I have a SOAP result set that the nuSoap extension has turned into a nice array for me. I'm sure I could scratch out some long way of looping it for what I want - but it seems there must be a faster way to just loop through the specific data elements. Here is the array:
Array
(
[xxxResult] => Array
(
[NewDataSet] => Arra...
For security purposes,
I would like to create a security token for every CRUD operation on a site running a LAMP stack. The security token would be attached to the a href URL and would be verified after the user clicks on the link before displaying or doing anything.
First of all, are using security tokens a good first step in securing ...
Hello I am using preg_match to parse for data, it works 99% of the time but sometimes it gives me a result like:
$match[1] = <a href="example">text i want</a>
when what I really want is the "text i want" string. I am looping preg match and 99% of the time $match[1] gives me the text string i want but I want to implement something into...
I am trying to make a simple redirector controller in CakePHP. I'd like the URL to be of the form:
http://example.com/redirector/<numeric id>/<url to redirect to>
For example,
http://example.com/redirector/1/http://www.google.com
The URL that I need to redirect could be more complex, of course, including slashes, parameters and ...