my code works fine if I remove the leading dots on file names, but breaks otherwise.
[edit]
The file starts with a dot (period) character
[end edit]
require_once('.htMyClass.inc.php'); //fails
require_once('htMyClass.inc.php'); //works
I wanted to keep the dots for security -- the leading ht is just a hold over from apache. i don't...
Okay so i set up this thing so that I can print out page that people came from, and then put dummy tags on certain pages. Some pages have commented out "linkto" tags with text in between them.
My problem is that some of my pages don't have "linkto" text. When I link to this page from there I want it to grab everything between "title...
I'm using CakePHP 1.2 with Auth and ACL components.
In my user register action, the password is coming in unhashed. Specifically, this expression:
if ($this->data['User']['password'] !=
$this->Auth->password($this->data['User']['confirm_password']))
This is evaluating to true, even when I submit identical values for password and...
I built this class to work with PDO, to make SQL queries 'easier' and less to worry about.
Here are my thoughts
Should it be more like class DB extends PDO?
Is the query method too big? Should it be split into private methods which are called.. is this what is known as loose coupling?
Is my way for detecting a SELECT query too ugly f...
I have a PHP application where I would like to certain objects to persist in the following manner:
The object must not exist in the $_SESSION. Separate web browser windows must control separate instances of the object.
The end-user must not be able to modify the object by changing the content of the $_REQUEST variable by hand (if this...
We have an enterprise application written in asp.net c# (3.5) and SQL server that we want to bundle and release for customers.
However, several have expressed concerns that it requires a Microsoft server due to the costs. Yes, I know... Therefore, we are considering porting it to a LAMP stack, with the "P" referring to php.
What ch...
I'm looking for an IDE with use with the Symfony Framework.
I have a bit of experience using the NetBeans 6.5 IDE but it does not always seem to complete the class methods, plus it doesn't seem to have any PHP code snippets built in.
Here are the features I would ideally like to have, in order of importance, from an IDE:
Code complet...
I have a javascript slideshow that pre-loads images out of a mySQL database and then displays them one at a time in an image tag in the HTML document. Briefly, it accomplishes this by pre-loading images like many slideshow tutorials show on the web, but instead of using static images (i.e. images/image1.jpg etc.) it uses a dynamic image ...
Hi,
I have to produce a versioning system to store multiple versions of my articles in a database to allow the user to roll-back if required. My first thoughts are when the user wants to edit an article really I get the sql to no longer update but you insert their information back into the database. Currently the problem is i have an a...
I am having problems executing a prepared statement via mysqli.
First I was getting Command out of sync errors. I am storing the result and closing the connection, and I have stopped getting this error, so hopefully the problem has stopped.
However, the error in my sql syntax error, which was working fine while the commands were not in...
Hi all,
Probably a problem many of you have encountered some day earlier, but i'm having problems with rendering of special characters in Flash (as2 and as3).
So my question is: What is the proper and fool-proof way to display characters like ', ", ë, ä, etc in a flash textfield? The data is collected from a php generated xml file, ...
Using Php. Need:
On String Input: "Some terms with spaces between"
OutputArray <String>: {Some, terms, with, spaces, between}
...
Hi all,
How can I define an associative array in a SOAP wsdl file? This is how I define an array element type so far:
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="webservice.wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xsd:import namespace="http://schemas.xmlsoap.org/...
Hello, guys.
Need your advice very much.
We'are working on the PHP project, which was in development for 2+ years, and now the team is ready and feel willingness to switch the development on ORM rails. Because it realy fasts the development and allow you to operate by Objects and not think in terms of SQL code and database tables in mos...
I have a function, which is to return an array of rows containg records from a database, selected based on a LIKE query. I want this query to be a prepared statement for security reasons. Apparently I can not use bound parameters and the query function as I am doing. I am unsure then, of how to keep me query as a prepared statement, and ...
Hi,
I would like to have a subscription sponsored wiki in mediawiki. I want the paid members to have access to certain part of the wiki. How do I achieve that?
Is there a plugin/extension or needs a rewrite.
In any case how do I implement the payment gateway if I was flagging the paid users in the DB?
Any help will be appreciated.
...
I'm having a few problems converting video files from the command line using FFMPEG. I'm using a CentOS server, but unfortunately I don't have shell access.
When I suppress sound using the following command, everything works perfectly (except of course, there's no sound!)
ffmpeg -i $infile -an test.flv
However, when I try to enable s...
I'm trying to get hidden files to show in Eclipse (namely, a .htaccess file), and the answers point to doing something in the 'Package Explorer'. I'm using Eclipse PDT 2.1 and it's not apparent to me what / where that is. How do I get to this fabled 'Package Explorer' ????
...
So, I'm looking for something more efficient than this:
<?php
ob_start();
include 'test.php';
$content = ob_get_contents();
file_put_contents('test.html', $content);
echo $content;
?>
The problems with the above:
Client doesn't receive anything until the entire page is rendered
File might be enormous, so I'd rather not have the wh...
The standard PHP way to test whether a string $str ends with a substring $test is:
$endsWith = substr( $str, -strlen( $test ) ) == $test
Is this the fastest way?
...