I recently took my Db initiating code out of the __construct of my Page class and placed it just after I initiate the Page class. I removed it from within the Page class because I want to be able to access it from anywhere (other classes for example). It also takes server, username, password and database arguments to it when initiated, a...
Hi,
I'm working on a new project, a web application, where I need to focus the user on a particular task. Therefore I want to eliminate all other "System Generated Noise", like Browser Menus, Buttons, Address Bar, OS Task Bar and so forth. I have seen implementations like Lightbox, but this modal approach is limited to the size of the b...
I want to display documents on my website. The server is hosted on a Debian machine. I was thinking I can allow the upload of support documents then use a Linux app or PHP app to convert the doc into PDF and display that in an HTML page. Are there any APIs or binaries that allow me to do this?
...
Setup is following:
Drupal project, one svn repo with trunk/qa/production-ready branches, vhosts for every branch, post-commit hook that copies files from repository to docroots.
Problem is following: Drupal website often relies not only on source code but on DB data too (node types, their settings, etc.).
I'm looking for solution to ...
.
echo date('r',strtotime("16 Dec, 2010")); //Tue, 16 Dec 2008 20:10:00 +0530
echo date('r',strtotime("16 Dec 2010")); //Sat, 16 Jan 2010 00:00:00 +0530
That's just wrong... Either it should fail or it should parse correctly. Do you know any robust natural language date/time parser in php? How do you parse natural language date ti...
I have an xml file which I would like to create a form/table around to add, edit and delete records using PHP. Currently I use simpleXML to load the XML file, and display its content on various pages.
Is there any way I can create a table that shows all results, and allows me to either edit or delete that particular row of the table wh...
I'm looking for a replacement website application development IDE. Ideally it will run on both Linux (Ubuntu) and Windows.
I'm typically developing small to medium sized web applications of some richness and complexity - by way of example I'm currently handling a site for a local council which manages their waste collection and reproce...
If i have a parameterized SQL statement like this:
SELECT * FROM table WHERE my_field = :field_value
Does anyone know if PDO will recognize this(see below) as the same SQL statement and use the cache instead of assuming it's a completely different SQL statement:
SELECT * FROM table WHERE my_field = :new_field_value
So, I guess the...
I'm creating a Q&A application in CakePHP, and I want to exclude my associations in some cases. Imagine the following:
I'm listing all questions on the first page using $this->Question->findAll();. Since I have the following association in my model:
public $hasMany = array('Answer' =>
array('className' => 'Answer',
'order' =...
I am developing a web-app using zend framework. I like how all the autoloading works however I don't really like the way Zend_Controller names the controllers by default. I am looking for a way to enable zend_controller to understand my controller class named Controller_User stored in {$app}/Controller/User.php . Is there anyway I can do...
$c = $record['corrects'];
$i = $record['incorrects'];
if($c == 0 && $i == 0)
{
$image = imagecreatetruecolor(200,80);
$white = imagecolorallocate($image,255,255,255);
$red = imagecolorallocate($image,255,0,0);
imagefilledrectangle($image,0,0,199,79,$white);
$text = 'Quiz cancelled!';
$box = imageftbbox(10,0,'verdana.ttf',$text...
I'm running on win2003 server, PHP 526, via the cmd-line.
I have a cmdline string:
$cmd = ' "d:\Prog Files\foo.exe" -p "d:\data path\datadir" ';
Trying to do this in php code
$out = `$cmd`; # note use of backticks AKA shell_exec
results in a failure by foo.exe as it interprets the -p arg as "d:\data".
However, the same $c...
I'm using this to check for the availability of a URL:
$fp = fsockopen("$url", 443, $errno, $errstr);
and I get this error back...
Warning: fsockopen() [function.fsockopen]: unable to connect to https://example.com/soapserver.php:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) ...
I have a set of data that models a hierarchy of categories. A root category contains a set of top-level categories. Each top-level category contains a set of sub-categories.
Each sub category has a set of organizations. A given organization can appear in multiple sub categories.
The leaf nodes of this hierarchy are organizations. An o...
Can someone tell me how can I extract a public keu in .pem format from a .cer file ?
I'm trying to configure webservice over https with nusoap.
Tks,
ED
...
I've been building a db input form. There are three fields for notes. They were all build at the same time. They have the same logic & class system - but one of them is returning with escape marks when I update the record (e.g.) i enter
1
2
3
and the updated record returns
1\r\n2\r\n3
I'm confused as the other return the text as f...
Is there a static code analyzer for PHP files? The binary itself can check for syntax errors, but I'm looking for something that does more, like unused variable assignments, arrays that are assigned into without being initialized first, and possibly code style warnings. Open-source programs would be preferred, but we might convince the...
I am using HTML Purifier in my PHP project and am having trouble getting it to work properly with user input.
I am having users enter in HTML using a WYSIWYG editor (TinyMCE), but whenever a user enters in the HTML entity (non-breaking space) it gets saved into the database as this weird foreign character (Â).
However, the thing...
I have a site where users can post stuff (as in forums, comments, etc) using a customised implementation of TinyMCE. A lot of them like to copy & paste from Word, which means their input often comes with a plethora of associated MS inline formatting.
I can't just get rid of <span whatever> as TinyMCE relies on the span tag for some of i...
We have a tech support website/database at work that we use to record our interactions with customers. Our tech support people are not capable of creating their own accounts.
We also use Mantis on the same server as a way to keep track of bugs.
Inside the tech support site we would like to have a link to Mantis so that our tech support...