Hi,
I use this function
function iptc_make_tag($rec, $data, $value){
$length = strlen($value);
$retval = chr(0x1C) . chr($rec) . chr($data);
if($length < 0x8000)
{
$retval .= chr($length >> 8) . chr($length & 0xFF);
}
else
{
$retval .= chr(0x80) .
chr(0x04) .
chr(...
Hey everyone,
I am writing some PHP code to create PDFs using the FPDF library. And I basically use the same 4 lines of code to print every line of the document. I was wondering which is more efficient, repeating these 4 lines over and over, or would making it into a function be better? I'm curious because it feels like a function woul...
page1 or page2 on same server.
page1:
<div id="id_div">
</div>
page2:
getid=id_div
I don't care in what programming language, but how to catch id from another page ?
...
Hi,
I have a requirement to accept an array of checked items from a table and update a field based on which items have been selected. Initially my thoughts where to simply loop over each of these items in the array and access a function in the specific class to update the status.
I'm slightly concerned about this approach as it would m...
Hi experts,
Upon transfering my site from one server to another, some functions started behaving differently.
The problem lies in building my rss feed. My feed are composed of database posts containing html, and to show them correctly in the feed I then need to change the picture paths to full domain paths, instead of just server root....
Trying to create a Maven PHP project (just test) for Sonar
Generated empty project with
mvn archetype:generate
-DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-web-archetype
-DarchetypeVersion=1.0 -DgroupId=org.sample -Dartifact=my-app
Then trying to compile empty test project with
mvn clean compile -e
And get...
Hi everybody,
I have the following php loop that takes an array that contains a set of arrays, then I convert each array to a list to manipulate more accurately the elements.
while ($i<sizeof($my_array)){
while(list($key,$val) = each($my_array[$i])){
$j = $i+1;
if ($key == "fruit"){
$val = "ananas".$j;
...
I'm actually gettings these errors and I cannot let them fixed. I need some help. I can't found anything on Google, sorry.
there is no attribute "href"
<div id="audio" href="http://domain.com/mp3/Green Day - A Quick One While Hes…
there is no attribute "xid"
<div style="margin: 0px 100px;"><fb:comments xid="music52"></fb:comments></...
I have a page which reloads a DIV with AJAX every 5 seconds. I also have an AJAX sorting script (you can see it here). The sorting script works great when I visit the page for first time, but when the page is refreshed it doesn't work.
Am I doing something wrong? I have the sorting script in the HEAD tag, and the refresh on the bottom b...
We're a Windows shop, but have set-up ActiveCollab installed under IIS using a PHP plug-in and having set-up a MySQL database server.
I've just upgraded up to the latest version of ActiveCollab (2.3.1), but I'm having difficultly getting the SVN integration working.
As shown in the screenshot here: (http://www.avonandsomerset.police.uk...
How do i repost post data, so that i can generate a print preview of a page, by applying a different style sheet. GET is not an option as the data can exceed url length limit.
Here is the premise, FORMPAGE posts data to RESULTSPAGE, RESULTSPAGE has a print preview button which reloads the RESULTSPAGE page and applies the print style she...
I am primarily a PHP developer, and I have been browsing the source code of a few open-source applications recently(Mozilla Bespin in particular), to find that some of them use a Python "back-end." I was just wondering what the purpose of this back-end is. I am assuming it is the same thing as the model in an MVC framework and is used ...
How can i replace this <p><span class="headline"> with this <p class="headline"><span>
easiest with PHP.
$data = file_get_contents("http://www.ihr-apotheker.de/cs1.html");
$clean1 = strstr($data, '<p>');
$str = preg_replace('#(<a.*>).*?(</a>)#', '$1$2', $clean1);
$ausgabe = strip_tags($str, '<p>');
echo $ausgabe;
Before I alter the ...
I haven't found a clear answer to this question (but have determined the HTML tag is more trouble than it's worth.)
When you're working with multiple directories on a website, how do you make sure relative links to the rest of your site work as you change your current directory? I don't want my link to "/index.php" to actually link to ...
Does anyone know how to make a .ico file that will work in Intenet explorer?
I can't seem to get anywhere
here is my gd code
$im = imagecreatefromjpeg(FAVICONDIR.'normal/'.$filename );
list($width, $height) = getimagesize(FAVICONDIR.'normal/'.$filename); // get the width and height of the jpg
$image_p = imagecreatetrueco...
When execution a script that includes a library, I whant to find from whithin the library the caller script, in Perl I'm using env: $0 that gives me the path to the caller script. In PHP __FILE__ gives me the current script, so in the library it gives me the library path not the caller script path.
from perl documentation: $0 Contains t...
Possible Duplicate:
PHP UML Generator
Please, can you advise me a programm for generate UML diagram
...
Hi all,
In my current setup i have a zend lucene search index which stores the primary keys of my_table rows in the index, along with other unstored fields.
Upon a search the index is queried, the results of which then are looped through and inserted into a mysql temporary table, which is then joined via the primary key onto my_table....
Does anybody know an all-purpose logging suite for PHP applications?
By "suite" I mean a lightweight library of logging functions as well as a mature back-end to view them.
The back-end would have to be configurable and show log entries using functions like
Filter by date
Filter by event (Warning, error, custom event)
Filter by categ...
We have url:
http://site.com/index.php?action=show
$_GET['action'] is used in templates to check value of ?action=:
switch ($_GET['action']) {
case = "show" {
$match_show = true;
}
}
and in other place:
echo $_GET['action'];
Is it absolutely safe to use this constructions?
How to make them safe?
Thanks.
...