Someone recently told me,
"In the past, Google never indexed PHP pages".
I don’t believe that for several reasons. But I’m no SEO expert, or even a novice, so I wonder. Before I file that person under “unreliable”, I thought I’d ask the SO community: Is there anything to that?
Thanks.
...
I am primarily an ActionScript programmer and I love working with XML using E4X. I also use PHP a lot but am currently too intimidated to process XML with PHP, I was wondering if there was a way to use E4X in PHP?
Thanks.
...
I want to make the results of a foreach loop into a string variable I can use later all over (so I don't need to paste the foreach loop everywhere). I have this:
foreach($pairs as $d=>$m) {
$orderedpairs .= "[".$d."],[".$m."]"+"<br />";
}
echo $orderedpairs;
If I substitute the assignment operator with "echo", it works fine, so the lo...
I have two tables in my SQL database:
Company:
- ID (autoincrement)
- name
- address
- ...
Employees:
- ID (autoincrement)
- Company_id
- internal_id
- name
- lastname
The problem is that I would like to have a employee id (internal_id) that is relative to the company they belong to. I got this dilema since I'm really been se...
I currently use CodeIgniter as my framework of choice when using PHP. One of the things I am wrestling with is the idea of a "page" and how to represent that properly within MVC. To my knowledge, CodeIgniter has a front controller that delegates to page controllers. So in my thinking, each page would have it's own controller. But all...
I am setting up a web server for a client. They will be using a web app (PHP/LAMP) that I am building. The server will be sitting within their network locally. There will also be a MySQL database on the same server. The load on the server will only be 20-25 concurrent users, but uptime and performance is still very important.
The app...
I've been working on writing unit tests for my PHP code. PHPUnit is what I'm using for this.
I have some classes that work great until...
I throw XDebug into the mix.
At that point, PHPUnit doesn't crash or anything, but setExpectedException never triggers.
In fact, the code never goes beyond that point.
Anyone run across this and ...
Hi there,
I'm using the flot graphing library for jQuery, and it uses javascript time for any time series (to remind, that's milliseconds since Jan 1970. Unix time is seconds).
My current code looks like this:
foreach($decoded['results'] as $currentResult) {
if($currentResult['from_user'] == $user) {
$strippedTexts = $...
If I have a hello.php file like this:
Hello, <?php echo $foo; ?>!
I would like to do something like this in some php code:
$text = renderPhpToString('hello.php', array('foo'=>'World'));
and end up with
$text == 'Hello, World!'
Is this possible with standard PHP 5? Obviously I want more complex templates with loops and so forth.....
Hello, The code below is what I'm using for a website menu which moves the link for the current month's page to the top of the link list on the change of the month.
But this fails on the 31st of some months, such as April; I get two links to the same month for most of the links. I've read through the issues with the way php generates da...
If you were testing a count function like the one below, is it considered to be 'right' or 'wrong' to test multiple things for the function in one function vs having a test function for each of the tests?
function testGetKeywordCount()
{
$tester = $this->getDatabaseTester($this->CompleteDataFile);
$tester->onSet...
I need to implement a couple of functions which comply with the following:
function genKey: given a string q (this may be a MD5 or SHA hash) and a seed string, the function must generate a new string p
function checkKey: this function must return true if a string p was generated from string q (using the previous function)
In seudo-...
Hello all,
I wish to upload from my Flash Application (AS3) to imageshacks XML API. I wish to know how I can do this.
"In Flash, we must POST the data using the UrlRequest and UrlLoader classes, however we run into a limitation of the Flash API. The data property of a UrlRequest can either be a UrlVariablesByteArray object. There is no...
I have a site which has a page that shows the user a set of workout sessions in each table. The exercises in the sessions are href links and cannot be sent to the database as variables.
The links are displayed in tables on the page which is another reason why I can't send them to the database.
How can I save the state of the web page, (...
I really like the PHP function strtotime(), but the user manual doesn't give a complete description of the supported date formats. It only gives a few examples like "10 September 2000", "+1 week 2 days 4 hours 2 seconds", and "next Thursday".
Where can I find a complete description?
...
I put a check in a script that makes sure a total is correct. What it does is looks at the total as it is stored in the database and then using other variables, calculates what the total should be.
If these two values - the stored total and the calculated total - are not equal, it's a problem so I want it to send an email alert.
Here's...
I have this function whose essential operations are outlined as follows:
function render($index) {
foreach($things[$index] as $key => $data) {
echo '<div>';
/* irrelevant operations */
if(isset($data['id'])) {
echo '<div class="wrap">';
render($things[$data['id']]);
echo '<...
I have a php site setup with multiple controllers for the different sections of the site.
e.g index.php, gallery.php, faq.php etc.
Currently I have a base template which I call from each controller, which in turn includes the relevant content for the page. I also use tinymce to edit this content file.
So it's really a very simple cms.
E...
I am mainly looking for good development practices specially when working in conjunction with mysql. I searched through the questions but could not find any related questions. I would appreciate if some one share their practices and wisdom gained through experience.
Apart from some coding standards, I am also looking for design standar...
hi there,
does anyone know how to make live javascript time running..
i have this php code
$expiredate = date('d m Y G:i:s', $rdate1);
$f_ex_date = explode(" ", $expiredate);
$f_ex_time = explode(":", $expiredate);
$_endDate = mktime($f_ex_date[0],$f_ex_date[1],$f_ex_date[2],$f_ex_date[1],$f_ex_date[0],$f_ex_date[2]);...