Is it better to concatenate a variable (say, $name) into an existing string (say, $string) like this:
$string='Hi, my name is '.$name
or like this:
$string="Hi, my name is $name";
or like this:
$string=sprintf("Hi, my name is %s",$name);
in terms of processor time/efficiency.
...
Hi all,
I want to limit what PHP functionality my users have access to.
For instance there is an object $data and the user likes to use if for and echo.
Obviously allowing him to write PHP would be a serious vulnerability.
Is there any way to run this PHP in a sandbox or would you recommend any lightweight PHP template engine?
...
This is probably a pretty high-level question that requires a lot of explaining, but I'm in need of a lot of explaining.
Basically I'm developing a PHP application that requires a lot of logging and tracking. Tracking clicks, interactions, performance, etc. etc. Anything under the sun. Facebook's Scribe and Yahoo's Chukwa are both great...
create the html form data store in xml file and xml file save in Desktop
plz quickly answer send my email
...
Is OSCommerce outdated?
I recently started working for a web development company that uses it a lot and I noticed the code base is really messy and has a lot of older php code in there. Being used to something nice like cakePHP or drupal I wasn't too impressed with it.
Is it worth using any more?
Is there a decent port of OSC that i...
Hi,
seem to have a inconsistent problem with one of my pages.
In some IE browsers it displays nearly a whole screen of blank white space between the header and the main content, strangely enough on my pc using both firefox and ie the page displays correctly however on some other pc's it shows the blank space.
http://kiwiradio.blakjak.n...
Hello,
i'm developing a NuSoap WebService to be consumed from a Flash app: everything runs fine but, when returning a response in XML, i receive a lot of non-useful (for the client) attributes like xsi:type="xsd:string" xsi:type="xsd:int" for every node.
I know that they are necessary for SOAP stuff, but i'm asking if there is a way to ...
Is it possible to create an EJB with implementation in PHP, accessible through REST (not RMI)?
...
hi,
i have an array that can contain the same value more than once. What I'm trying to find is a way to compare the values inside that array and output every value only once.
$_just_a_tier = array();
foreach ($_associatedProducts as $_item){
// count all products
$_tierprice = $this->getTierPrices($_item);
foreach ($_tierpri...
Hi,
I'm new in JSON, but now I need to use JSON for my Flash ActionScript 3.0. So I found one lib for JSON and I have seen the terms Deserialize & Serialize what does that means.
...
Hi!
I want to wrap particular lines in a text mass with <b></b>
First line in the text
All lines with a previous empty line (eg two newlines before)
I'm using preg_replace with php, but I'm really shitty with regex. Good tutorials are appreciated.
...
I am currently tasked with porting our website code onto a linux server (from Win2003). The websites run on a MS SQL database. The original dev created a wrapper to contain all interaction with the database including selecting the correct database (the application spans multiple databases)
The problem code is as follows...
if (strcmp($t...
Is it possible to do some sort of try catch that will catch warnings?
e.g.
if (!$dom->loadHTMLFile($url)) {
//if cant load file handle error my way
}
For the $url I am using I am getting
Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
...
Hi,
I am trying to show a google map using the following code:
<embed height="400" width="600" src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=110069293083852065946.00047e2506156dd8d127b&amp;ll=27.727526,85.310855&amp;spn=0.021197,0.038581&amp;z=14&amp;iwloc=00047e251edcecb28ba7c&...
Hi
My web site page contains lot of queries. So it takes lot of time to execute, and ends in an error. Could you please tell me how to increase the execution time (may be the query execution) through php coding?
Thanks in advance
...
Hello I currently have this PHP Script
<?php if($purchase_dates != FALSE){?>
<?php foreach($purchase_dates as $id=>$outer_value) { ?>
<!-- Output the date here -->
<!-- Start Purchase table -->
<?
$date =...
Hi,
I have a string, which is comes from js using encodeURICompoent(). Now i would like to convert this string into array. I tried my level best to solve this. But i couldn't find any solution to do this. Any help greatly appreciated.
array string = 'array(0=>array("packid"=>22,"pverid"=>18,"yaml"=>"- url: /static
static_dir: static
...
Hi
Thanks in advance. while installing the magento on server i got the following error
Database server does not support the InnoDB storage engine.
How i overcome this?
Database connection error.
Does any one know this? Please help me..
...
I have 4 Tables (listed bellow) and need:
get last 10 Chats from Room 3 without banned users
show nickname for fromuserid
HIDE Users $userid dont like to see table "HIDE"
Table 1 "chats"
ID(autoinc) fromuserid roomid text
1 23 3 bla
2 14 1 bla
3 11 ...
Hi,
Scenario : I have a c# .net web page. I want the user to be able to download a file placed on a remote server from a link on my page. However while downloading there should be minimum load on my server. Hence i tried creating a HttpWebRequest instance, passed the download.php path
e.g.
HttpWebRequest myHttpWebRequest = (HttpWebRe...