Is there a way that I can save my Visual Studio 2010 files as UTF-8 encoded? I'm using VS.NET 2010 as a PHP editor using VS.PHP.
If there is a macro that will launch during the saving process that will handle this, that would be fine too.
Thanks in advance!
...
Hello everybody,
I'm developing a Symfony 1.4 project where one of the tables has the Geographical template.
The present functions can give the distance between two records, but not between records and given coordinates.
How can be implemented such feature in Symfony way?
More specific: I need the records ordered by descending distanc...
array
324545432 =>
array
0 =>
array
'Age' => int 1
'Status' => string 'INSTALLED'
'Id' => string '830026495'
'name' => string 'TV'
1 =>
array
'Age' => int 2
'Status' => string 'GOOD'
'Id' => string '553718299'
'name' ...
I have a seperate PHP file I include that has a several important functions on it. I also have a file called variables.php which I include into each function so I can call some important variables too. Is there a way to just call variables.php at the top of the page, instead of inside each function manually? I just thought it would be ea...
Ok I have a foreach loop and wanted to know if I could get the last iteration data value for the current iteration?
Code:
foreach($array as $key=>$data) {
echo "Key: ".$key." Data: ".$data."<br />";
}
Results:
Key: 0 Data: 23244
Key: 0 Data: Program ID: 39-1-1499-1
Results I would like:
Key: 23244 Data: Program ID: 39-1-1499-1...
Ok, I don't use php often enough to remember it when I wander back into it. I'm going a bit crazy with this one. I'll post the code below but a few quick explanations. con.php is a php file that creates the database connection $wkHook. There is no issue at all with the connection, so that is not my problem. Basically, I am selecting...
hi
Is there anyway that I can use firebird with my winbinder standalone application?
i'm developing simple windows application with winbinder and I was trying to embed firebird with my application. does anybody knows how to do this if its possible?
...
Currently I have the following rules...
RewriteRule ^([^/]+)/([^/]*)(.htm)?$ index.php?filter=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/$ index.php?filter=$1 [L,QSA]
Which basically catch anything in /dirname/page.htm
Now there exists the chance that the script will have to intercept a variable level of paths, such as /dirname/twodirna...
So I have a loop to be nested inside another loop based on two queries. I have the first loop working fine-
$sql_categories = mysql_query("SELECT * FROM $categories_table");
$results = mysql_query("SELECT * FROM $events_table");
while ($num_rows = mysql_fetch_assoc($sql_categories)) {
extract($num_rows);
echo "<h2>...
I am using Netbeans 6.8 for PHP (under Windows 7) and the subversion integration doesn't work. I am able to checkout a module but I don't see the subversion features in the menus or the outine in the editor left margin that shows the changes in the files. I am using it under Ubuntu with no problems.
Did any of you experimented the same ...
Hi.
My script:
<?php
ob_start();
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header('Content-type: text/html; charset=utf-8');
include "tilslut.php";
$userid = $_GET["userid"];
$s = mysql_query("SELECT points, lastpoint FROM member_profile WHERE us...
I am writing a website crawler in php and I already have code that can extract all links from a site.
A problem: sites use a combination of absolute and relative urls.
Examples (http replaced with hxxp as I can't post hyperlinks):
hxxp://site.com/
site.com
site.com/index.php
hxxp://site.com/hello/index.php
/hello/index.php
hxxp://...
I'm having problems passing utf-8 strings to javascript (ajax). Currently i'm using rawurlencode on the PHP side and unescape on the javascript side.
The problem is in latin and rawurlencode doesn't support it fully.
Is there any alternative or any better option?
...
I use the free webhost 000webhost. The service is okay but it inserts some javascript counter into every file and request.
The script looks like this.
<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"&...
When I call the following:
file_get_contents('http://whgfdw.ca');
or
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://whgfdw.ca');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
The return value is the HTML of the homepage of the main site located on the local (dedicated) w...
An easy question:
How do I check in PHP if a checkbox is checked or not?
...
I've been tasked with getting two MS SQL based products to synchronize. My predecessor was content to match records based on a combination of name and address, but both systems have a GUID, and only one is actually using it. So my thought was to match up my existing records and copy the GUID from one database to the other. But I can't se...
I have the following C# code to produce a small PHP file. The reason I am doing this is to update 400 plus sites automatically. The sites are in PHP on a Windows Environment so using C# for utility apps is the easiest for me.
fileContents.AppendFormat("<?php{0}",Environment.NewLine);
fileContents.AppendFormat("# FileName...
Hi, can someone please tell me how to save a javascript rendered countdown timer to mysql db using PHP ?
e.g
I have this button, that when someone clicks it, the countdown appears and starts counting.
so yeah, that's my problem, what's the best way to do in order to ensure that
- the exact date/time(in unix format) the button got click...
I'm doing a search through a database to find articles written within a certain month:
between '1 '.$month.' '.$year and '31 '.$month.' '.$year
Is this method ok even if some months (like February) only have 28 days? In other words, do I have to dynamically find the number of days in the month, or not?
...