I am creating a very simple file search, where the search database is a text file with one file name per line. The database is built with PHP, and matches are found by grepping the file (also with PHP).
This works great in Linux, but not on Mac when non-ascii characters are used. It looks like names are encoded differently on HFS+ (Ma...
Looking for the python equivalent of this.
http://ca3.php.net/manual/en/function.extract.php
...
Hi,
when trying to log-in at this site (user:polopolo,pass:samara) the result is a blank page. I know that the problem is with the sending of headers and the *ouput_buffering* in the php.ini file. I had the same problem on another host but the problem was fixed when I changed *output_buffering= On*. It doesn't work on the current host a...
Not sure exactly how to describe this, but here goes ..
I have a large PHP function library that I want to expose via some sort of api interface.
For example, this query string:
api.php?function=myFunction¶m1=xxx¶m2=xxx&
Would translate into this:
$ret = myFunction( $param1, $param2 );
.. whereas this query string ..
api...
I have to make a handshake page in php that will take a querystring that is encrypted for a function in Java/JSP and decrypt it in PHP fir use in an application.
I have found this to be a good starting point http://propaso.com/blog/?cat=6 but it encrypts in PHP and decrypts in PHP, the reverse of what I need to do.
Anyone know common C...
I am having trouble getting my modal window function to bind to some returned data. I am using Cody Lindy's Jquery.DomWindow plugin. Please note that everything functions properly, except for this problem.
The problem occurs when the data that is returned from my jQuery.getJSON call contains a link that is supposed to open up the modal ...
I'm trying to make a connection to a secure sftp site, however I'm not able to list the directory,however, it's possible to connect using python "expect" or php"ssh2_connect" but it gives me the following mesg: Received disconnect from xx.xx.xx.
If I use a GUI appliction like winscp I'm able to go to the sftp server and retrieve files.
...
Howdy,
When calling the following type of url in a controller's init method I get two different results on two different servers:
http://address.com/index/action/?start=2009-04-18&end=2009-04-21
Calling
echo $_GET['start'];
Gives me 2009-04-18 on one server and nothing at all on the other server.
However, and this is t...
Hello,
I am asking if it is not only possible to pull data from a MySQL table, but also display each row in either a table or a DIV, preferably a DIV. How would I do so?
Table:
ID |BodyText |Title |
1 |Hello World1 |Title1 |
2 |Hello World2 |Title2 |
etc..
I'd like to put each row into a DIV that...
Given the following code:
// Connect to MySQL up here
$example_query = $database->prepare('SELECT * FROM table2');
if ($example_query === false) die('prepare failed');
$query = $database->prepare('SELECT * FROM table1');
$query->execute();
while ($results = $query->fetch())
{
$example_query = $database->prepare('SELECT * FROM tabl...
I don't mean actually installing it. I currently use LAMP for development and would like to start using memcached for a high traffic site. Which types of db calls should be cached? (all?) and what is a good way to do load testing on a development server? Are there benchmarks that I should be looking at on my production site first? T...
So, here's the deal. I am attempting to write a quick python script that reads the basic id3 tags from an mp3 (artist, album, songname, genre, etc). The python script will use most likely the mutagen library (unless you know of a better one). I'm not sure how to recursively scan through a directory to get each mp3's tags, and then fil...
So I have a very odd issue.
First, I'm using PHP 5.2.6 (as part of MAMP, though this also happens on a LAMP server running 5.2.6 as well), writing a web site using Zend Framework 1.7.2.
Second, the software I'm writing does a rather complicated statistical calculation that requires a lot of memory. Usually it runs fine with 128MB set ...
How can I allow dashes in this pattern?
$str = preg_replace ( "/[^a-z \d]/i", "", $str ) ;
...
if I have a string like
<p> </p>
<p></p>
<p class="a"><br /></p>
<p class="b"> </p>
<p>blah blah blah this is some real content</p>
<p> </p>
<p></p>
<p class="a"><br /></p>
how can I turn it into just
<p>blah blah blah this is some real content</p>
needs to pick up nbsps and regular spaces
...
I'm working on a site where users submit photos which can be viewed one by one on a page.
There is another page where you see smaller versions of multiple photos.
When user clicks any of these smaller photos they get the large version page, pressing "next" will take them to another photo in that category.
I would very much like newer ...
For our company intranet, built in PHP and MySQL, I want to add an area where employees can post a short profile of themselves - a couple of paragraphs of text and an image.
What's the best way to convert this kind of plain text input to HTML paragraphs, bulleted lists, links, etc?
Clarification: This content will be displayed in a mod...
after i have finished with my result set from a active record query in a codeigniter model, should i use $query->free_result() or does activerecord automatically do that?
...
I have this code from an HTML form:
<select name="history12">
<option value="Gov/Econ">Government & Economics</option>
<option value="AP Gov/Econ">AP Government & Economics</option>
</select>
...and this code, in a mailer form:
$history12 = $_REQUEST['history12'] ;
However, when I try to echo() $history12, it always...
I have a dataset obtained from MySQL that goes like this:
Array
(
[0] => Array
(
[views] => 14
[timestamp] => 06/04
[views_scaled] => 4.9295774647887
[unix_time] => 1239022177
)
[1] => Array
(
[views] => 1
[timestamp] => 19/04
...