Right now I use a PHP script to pull together multiple CSS files into one script and then output them with a content-type of text/css.
The problem them with this is the browser wont cache the file.
Is there a better way of doing this?
Thanks
...
Hi guys...
I was wondering the job market for Flash and PHP developer. Which one is more popular in the job market. Also, I was wondering the PHP IDE choice that you guys use. I am using notepad++ for coding but I am sure you guys use better tools....
...
What is the correct way to write out the .htacess so that both www.domain.com/about_us and www.domain.com/about_us/ goes to www.domain.com/about_us.php
Currently, what I have is the below and just wonder if there's a way to put it in one line
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(about)$ /about_us.php
RewriteRule ^(abo...
Ok, I am using a GoDaddy web hosting plan on a Windows platform. This was not my choice -- it has to do with a different part of the actual site using ASP.NET (also not my choice). I have a SQL database with a bunch of entries with some non-sensitive customer information. The primary key on this is an AutoIncrement integer, and I have a ...
I've been writing a CMS in MVC style and have used a Template class to pull in the various files required via file_get_contents
At the end I do
eval('?>'.($template).'<?');
Knowing that eval is evil, how can I alternatively flush this data so the PHP actually renders the code?
At the moment the Template class does this once everythi...
I have an existing ini file that I have created and I would like to know if there was a way to update a section of the file or do I have have to rewrite the entire file each time?
Here is an example of my config.ini file:
[config]
title='test'
status=0
[positions]
top=true
sidebar=true
content=true
footer=false
...
Hello
I would like to produce a list of dates based on a user determined "start date", over a 12 week period.
If a user selects today's date, I need to know each date from today over 12 weeks.
Once I have these dates, I would need to insert them into a DB table.
I'd like to say I've made some in-roads into how to do this, I reckon ...
Hello, I'm getting a fatal PHP error when trying to execute my script: Using $this when not in object context The script collects data from Google Analytics via API, then displays it on a page.
Below is the piece of code where the script dies:
$records = $this->getAnalyticRecords ( date ( 'Y-m-d', $startTime ), date ( 'Y-m-d', $endEnd ...
i am trying to use the substring method inside a Js code wich echoes some php variable but it does not work.
$('#tarif_public_total').val( <?php echo $_tarif_public; ?> * $('#tarif_public').val() )
u=$('#tarif_membre').val()* <?php echo $_tarif_membre; ?> + $('#tarif_public').val()* <?php echo $_tarif_public; ?>
uu=u.substring(0,6)
$(...
Hi, I'm having some difficulty getting my $.ajax to work correctly. The function is getting called however it is returning an empty string. I'm fairly new to using $.ajax so I appologize if this is easy. The program works when I run it w/o javascript it just loads a new page with the output. Thanks
Here is the .js
$(document).ready...
What I'd like to do is use PEAR's Net_Ping package to ping a few servers to check if they are online and then display the status on a webpage.
The problem I realized is that if I use 3 packets to conduct the ping test, that equates to about 3 seconds. If I have to check 10 servers, that would leave the user waiting 30seconds on the pag...
Hello,
I am trying to display the full name of a user in Active Directory on an Intranet page. I can display their user id with:
$eadUserName = $_SERVER['LOGON_USER'];
echo $eadUserName;
but need to figure out a way to display their full name instead. I am new to PHP so any info would be greatly appreciated. Thank you!
...
Here is a simple php class for working with database. The problem with this class is in __destruct method, that launch mysql_close function.
If I create two DB objects that are situated in code very close it cause an error. It looks like that mysql_close close all database connections, not just his own($this->dbLink). Why it is happens?
...
I'm trying to write a PHP script for 'long-polling', returning data when new rows are added to a (Postgres) database table. Is there any way to get a SELECT query to return only when it would return results, blocking otherwise? Or should I use another signaling mechanism, outside of the database?
...
I checked Google and went through the Wordpress template tags but I still can't figure this out - in the single.php template file, which is the one used to display a specific post, how do I check whether this post is the most recent one OR the oldest post? Essentially I need to know whether this is first or last post out of all my posts....
I'm trying to create an xml-based template system. The idea is to return my views as xml files (xhtml) and then append them to specific nodes in a template xml file. The template xml is then transformed with xslt.
My question is: how do I insert these xml files into the template xml file?
...
Can someone shed some light on the differences between these 2 functions, from the PHP manual
addslashes:
Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash () and NUL (the NULL byte).
mysql_real_escape_string:
mysql_re...
I wish to determine whether there are any duplicates in two arrays, i.e. duplicates in array1 or duplicates in array2. If there are, then set a variable to equal 1, otherwise 0. I have the following code but it does not seem to work and I cannot understand why:
$a = count(array_unique($myarraydf));
$b = count($myarraydf);
$c = count(ar...
$BuID= mysql_real_escape_string($_POST['buID']);
$uID= mysql_real_escape_string($_POST['uID']);
$Vn = mysql_query("SELECT id, full_name FROM users WHERE id = '$BuID'");
$vc = mysql_fetch_array($Vn);
$U = mysql_query("SELECT id, full_name FROM users WHERE id = '$uID'"); // WORKS FINE
$showU = mysql_fetch_array($U); // WORKS FINE
The ...
I have a server-side script (PHP) returning JSON data to populate an ExtJS Grid.
This data comes from a MySQL query, containing some NULL values.
When PHP encodes it into the JSON notation, it keeps the NULL intact:
{"id":"33","name":"Test1","url":null,"cls":"x-tree-noicon","expanded":true}
But... when this data is displayed in the ...