I'm using the following style of array initialization in the code:
$a = array(
'one' => 123,
'two' => 456
);
But PDT/Zend Studio doesn't work properly in this case; after pressing [Return] key it places cursor under the $a (in my example) and ignores indentation. If array keys are numbers (at least not start with quotation mar...
Hello all,
I am working on a website, using PHP/MySQL, where users can upload videos, then, those videos are converted (using FFMPEG) to FLV and MP4 files.
Now, the whole 'upload' and 'conversion' process takes place on a different (remote) server that is actually being hosted by a different provider.
The reason I am using a differen...
This is driving me nuts!
I have created a query. The query is written to Windows file for future connection to the remote database.
Upon the connection using cURL, my local script uses cURL to send the query. I assemble variables using build_http_query. The cURL works just fine but the query fails. Every time. mySQL complains that qu...
I'm using Kevin Luck's jquery date picker plugin and I'm wondering what is the best way to format the dpSetEndDate() value to always be one year in the future? I tried using php:
<?php echo date('Y')+1;?>-<?php echo date('m-d');?>
But that didn't work. By itself, the php returns what I want to put in place of the date, but it doesn't...
Example:
Class A {
public function __construct() {
$this->b_Instance = new B();
}
public caller() {
$this->b_Instance->call_me($param1,$param2,$param3);
}
}
Class B {
public function __construct() {
//lots of variables here
}
public function call_me($param1,$param2,$param3)...
$variable = array(0);
$variable = array();
how are they different?
...
Hello all,
I am running a php script on a shared hosting server (hostgator). That PHP script is written with the codeigniter framework. Hostgator Shared hosting server only allows 25 processes to run. I have no idea why my script keeps creating the process on the server. The cpanel process server log looks like this:
2221 /usr/bin/p...
I have two different tables from which I need to pull data
blogs
which has the following column
blog_id
and another table which has a variable name, like
$blog_id . "_options
Which has the following columns:
option_id, option_name, option_value
For example:
option_id = 1, option_name='state', option_value='Texas'
option_id =...
So I've gone and customized the user login/pass/register pages Drupal 6 and no problems. However I now do the same thing with the contact mail page (contact module enabled) and all I get is the contact form and NO theme. What am I doing wrong?
function mytheme_theme() {
return array(
'user_login' => array(
'template' => 'use...
I have used cakePHP 1.2 and know how to use behaviors in it.
using cakephp 1.1 on a new project(i know it might sound silly but the project is very similar to an older project we have which was built on 1.1).
after a little googling i have come to believe that cakephp 1.1 models did not have behaviors.
cannot find any reference in the ...
i have found some pdf file geneartion program in php.
When i reun it i get the following error
Warning: require(/include/fpdf153/fpdf.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\aks\mikepdf.php on line 57
Fatal error: require() [function.require]: Failed opening required '/include/fpdf153...
Hello,
Does anyone have any experience using php to send an sms with skype
I want the user off the website to use one the forms and give them a choice if they want to send an sms to do some request. First it will have to check for the availabillity off skype on the clients computer, if so it should send an sms. I already have the users...
I am building a site which allows a user to point a CNAME record at my site to run their "profiles", this allows your OWN domain name to load your profile on my site.
This is raising all sorts of issues related to sessions. I have seen virb do it. I don't see any of the information that is session based in an iFrame... but there IS an...
I want to deny direct access to all .php files except one: index.php
The only access to the other .php files should be through php include.
If possible I want all files in same folder.
UPDATE:
A general rule would be nice, so I don't need to go through all files. The risk is that I forget a file or line.
UPDATE 2:
The index.php is...
Hi guys, I have some files:
core.php:
require_once 'logger.php';
require_once 'smth_else.php';
$Logger = new Logger();
$Else = new Smth_else();
smth_else.php:
...
$Logger->write(...);
...
And get:
Notice: Undefined variable: Logger in
smth_else.php...
...
require_once'modules/logger.php';
$Logger = new Logger();
require_once 'templates/list.php';
$Templates = new templatesList();
require_once 'widgets/list.php';
$Widgets = new widgetsList();
I use $Logger in templates/list.php and in widgets/list.php.
$Templates I use in /widget...
I'm trying to parse a string in a specific format and I'm really surprised to discover that I can't find a good function to do that.
The only one I found is strtotime and it doesn't fit as it guesses the date format. I really don't trust the "guess" part.
Moreover my string input is in a french format (dd/mm/aaaa) which it seems that it...
When you get a description of some project that should be made with Drupal, and requires some extra-functionality (beyond core and most popular modules), how do you decide how're going to do it?
Do you spend a day or two (or week?) searching for all possible modules, narrowing down the list?
What is the cricial point to start writing o...
I have problems because i don't really know how I can test my code and sql ( mysql ) to see how long SQL queries and PHP functions /code take to run.
Does anyone here know where I can find these tools?
...
Hi,
I have used the following code to create jpeg image using existing images. These images have used embedded color profile, Adobe1998 color profile.
header("Content-type: image/jpeg");
$src = imagecreatefromjpeg($upfile);
$dst = imagecreatetruecolor($tn_width, $tn_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $tn_width, $tn_he...