I am debating routing my requests with one of the two options:
Option 1: simple capture route with Mod-Rewrite and funnel written $_GET route to index.php for loading...
#default routing
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/([0-9]+)?$ index.php?rt=blog¶ms=$1 [L,QSA]
// ....
I've got a client who needs me to use PHP to split a TIFF image (which contains 2 or 3 images, sort of like an animated GIF) into its component images.
Can ImageMagick or one of the other graphic libraries do this?
...
Anyone know any good cake app build video tutorials?
m
...
I'm looking to write a library that "parses" information like facebook does when you post a link. However as I don't want to reinvent the wheel does anyone know of a library or and effort to write an Library that does this already?
I have included an example so that you can get a grasp of what I mean if you don't use face book.
...
I've got some tables on my system like these:
news
--id
--title
--content
video
--id
--title
--url
album
--id
--title
Now, I need to do a many-to-many relatioship with this tables, but in a flexible way. I created a table called 'links' with the below structure:
links
--parent_entity (example: news)
--parent_id (example: 5)
--chi...
I have been using eclipse-pdt in conjunction with xdebug and apache without problems, for over one year. Things worked flawlessly and I could do all the interactive debugging I wanted from within eclipse (using my own machine as a server).
Now I switched from apache to nginx (and therefore PHP runs now not as an Apache service but as fa...
Hey all!
I have an application written in .NET 3.5 with C# as the language. I'm using Web Forms, but using url routing with the routes defined in my global file. Everything is working as expected. In order for the pretty paths (see: user/665 instead of user.aspx?uid=665) to work properly, I had to add a wildcard mapping in IIS5.1 (local...
I have a custom field in WordPress called "thumb-url" which contains the exact location of an image. I want to only display the image if "thumb-url" contains the location of the image.
I'm start with an if statement that echoes photo exists if there's a value in the "thumb-url" custom field, otherwise it does nothing.
<div class="excer...
I'm inserting a new row into my database with this code:
$data = array(
'key' => 'value'
);
$this->getDbTable()->insert($data);
How can I get the row id of the this row that I just created?
...
I know this isn't exactly a programming question per se, but rather a settings question, but still:
I'm trying to convert video with FFMPEG with a PHP script, following this tutorial:
http://vexxhost.com/blog/2007/05/20/how-to-convertencode-files-to-flv-using-ffmpeg-php/
FFMPEG works perfectly and I've used it from the command lin...
Since PHP code will run just fine even if it's riddled with warnings and notices about undefined indexes and non-static methods being called as static, etc, the question is, if I spend the time to remove ALL notices and warnings from my code will it run significantly faster?
...
How can i convert an array like this to object?
[128] => Array
(
[status] => Figure A.
Facebook's horizontal scrollbars showing up on a 1024x768 screen resolution.
)
[129] => Array
(
[status] => The other day at work, I had some spare time
)
)
...
I have query in mysql:
SELECT * FROM (
SELECT COUNT(*) AS count, t.name AS name
FROM tag t
INNER JOIN video_has_tag v USING (idTag)
GROUP BY v.idTag
ORDER BY count DESC
LIMIT 10
) as tags ORDER BY name
and I want to write this in doctrine. How I can do that? I wrote:
Doctrine_Query::create()
->select('...
see
class Browser{
var $type = "";
public function e(){
return $this->type;
}
}
when use
$b = new Browser('human');
echo $b->e();
and i maen type not appear and i make it human as new ArchiveBrowser(the var type);
...
Is anything wrong with this code?
<?php
$variable = ;
if (isset($variable))
{
echo $variable ;
echo "also this" ;
}
else
echo "The variable is not set" ;
?>
also, the other potential value of the variable is :
$variable = <a href="http://www.mysite.com/article">This Article</a>;
To clarify, I have a variable that may hol...
I have a php form process script that wasn't saving correctly on our live or test severs but was working in my local test environment. I committed some trivial changes to the file and it started processing correctly. I then reverted those changes and thing still worked correctly.
I'm wondering if there was possibly some line breaks / n...
What is the difference between these four PHP statements?
if (isset($data)) {
if (!empty($data)) {
if ($data != '') {
if ($data) {
Do they all do the same?
...
I have three files:
1. moodsLogo.jpg
2. Copy of (images').jpg
3. Moods logo (Custom).jpg
and I have the following code:
// (..) some code here
$fileName = valid_filename($_FILES[ 'Filedata' ][ 'name' ]);
$bl->updateFieldValue("tableName","columnName",$fileName, $id);
function valid_filename($filename)
{
$filename = str_repla...
I am looking for a jQuery plugin with PHP script to do the same as in facebook "attach link" action, where facebook gives the user a list of thumbnails from the external link to represent the link. thanks!
...
I have the following variable being dynamically set by user generated content:
$variable = '<a href="http://www.mysite.com/article">This Article</a>';
When this variable is set, I then echo it as such
echo $variable;
I know that as is, this wouldn't be valid because I would need to escape the double quotes etc.
Is there a way t...