I'm defining the following variables:
$rel_path = bloginfo('template_directory');
$thumb_directory = "$rel_path/images/portfolio/";
$orig_directory = "$rel_path/images/portfolio/thumbs";
the $rel_path is a WordPress function which appears to be printing, however, it is displaying spitting an error message which indicates that $rel_pat...
Hiya all,
I'm having a strange issue here, i have this bit of code:
<?php
if ($node->nid == "1") {
include 'front.tpl.php';
return;
} else {
?>
<div id="left-col" class="grid_9">
<h1><?php print $title ?></h1>
<hr />
<?php global $user;if ( $is_admin ) { ?>[<a href="/node/<?php print $node->nid ?>/edit">Edi...
I want to convert a web page to a high-resolution PDF suitable for printing. How can I do this?
...
I'm trying to turn some query results into click-able links through PHP. I'm a beginner and don't really know much. I'm working with Wordpress. Here's what I'm shooting for:
http://www.celebrything.com/
The right side bar is display the count results. I'd like the celebrity names to link to search links for each name.
so the first shou...
i am following the tutorial from http://www.zendcasts.com/introducing-doctrine-1-2-integration/2009/11/
i have a doctrine.php that "bootstraps?" doctrine ... sry i dont really fully understand the tut yet
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . ...
I'm converting some old PHP 4.x code for PHP 5.3. I've come across the following, and I'm not sure what it does.
$variable =& new ClassName();
What is the difference between that, and:
$variable = new ClassName();
...
Hi,
how do you design your objects lets say you have an object user and an object access_role. The user is stored in users table in an sql database, the access_role knows the user_id and is stored in an sql database.
class user() {
protected $_name;
protected $_id;
protected $_age;
protected $_password;
public...
I am creating a search engine for my php based website. I need to search a mysql table.
Thing is, the search engine must be pretty 'smart', so that users can easily find their items (it's a classifieds website).
I have currently set up a FULLTEXT search with this piece of code:
MATCH (headline) AGAINST ($querystring)
But this is...
I installed curl using synaptic package manager on my Ubuntu machine. However it didn't installed with ssl enabled. When i do curl-config --protocols, it does not show HTTPS.
I want to install curl with ssl enabled. If i do it manually by downloading curl and then compiling it with "--with-ssl" flag and then recompiling my PHP with "-w...
My php script is working on localhost but after uploading online it's showing a blank page.
php installed on localhost version 5.2.6
php installed on production environment version 5.1.4
<?php
define('INCLUDE_CHECK',true);
require 'connect.php';
session_start();
php require 'function.php';
?>
<html>
<head>
</head>
<body...
I'm working on a football site witch, along with many features, list result tables. The tables are separated between seasons (season name, etc) and rounds (witch are generated everytime a new season starts up, like 2008/2009, 2009/2010, etc)
rounds table has a start date and a end date, and the only way I have to dinamically know wich r...
Hi,
I am using google checkout in my site.
But i'm not geeting response from there when i place an order.
Showing an error
"We encountered an error trying to access your server at http://www.mysite.com/cti-dev/check-out/test.php -- the error we got is Send failed with code: 401. Response body was: Failed to Get Basic Authentication H...
I'm writing some custom helpers in Codeigniter and I want to call some functions from other helper files like date, etc, in my helper. I keep getting "call to undefined function" errors. How can I reference other helper functions from my helper?
Thx
D
...
I have an app where I pull in tweets with a certain hash tag. When I find the hash tag the app automatically creates a user if they don't exist. When the user logs in via Twitter, I want be able to present them with their friends which are also using the app. The problem is for Twitter users with a ton of friends there is a max response ...
session_start();
$_SESSION['fname']=$row['fname'];
$_SESSION['user']=$row['name'];
$_SESSION['adpoint'] = $row['adpoint'];
$_SESSION['phone']=$row['phone'];
$_SESSION['id'] = $row['id'];
$_SESSION['rememberMe'] = $_POST['rememberMe'];
// Store some data in the session
setcookie('smsapp',$_POST['remembe...
We are working on a mission critical web application, we would like to expire the application's session out when a user presses the browser back button.
Please help me with my problem.
Thanks in advance.
...
Hi
I want to implement Google checkout in my PHP project (running on Apache). I put the callback URL in my merchant center account. My Checkout is in sandbox mode. When placing an order I get the following error message in my merchant center:
We encountered an error trying to access your server at myurl.org -- the error we got is
S...
Im trying to get the function below to return TRUE if it finds a matching row, and FALSE if it finds 0 rows.
function IsOpenEvent($id) {
$result = mysql_query("SELECT * FROM `events`
WHERE `access` = 'public'
AND `id` = '$id'
LIMIT 1")
...
Hello people,
I use this for clean a string:
$clean = preg_replace("/[^a-zA-Z0-9\/_.;|+ -]/", '', $str);
Works good, but I need add into the regex the char '&' too, I tried to add:
$clean = preg_replace("/[^a-zA-Z0-9\/_.;&|+ -]/", '', $str);
or
$clean = preg_replace("/[^a-zA-Z0-9\/_.;\&|+ -]/", '', $str);
but this doesn't work, ...
$wgAuth = new HttpAuthPlugin(); - After this line, control is not reachin the next line, not printin the next log.
error_log("JITEN TEST :WGAUTH object created, Value of wgAuth is :" . $wgAuth . "\n", 3, $logfile);
$wgHooks['UserLoadFromSession'][] = array($wgAuth,'autoAuthenticate');
error_log("JITEN TEST :Value of wgAuth is :" . $w...