Hello there!
If I have a code like this:
$file = basename($filename);
How do i get the file extension of $file? The variabel file could contain any kind of file, like index.php or test.jpeg.
Hi friends,
I've spent all day to find but can't find :(
How can I display CCK Field value with php in views_customfield? I tried the ones below, but no result
$node->field_homepage_linking["0"]["view"]
$node->field_homepage_linking["0"]["value"]
value_get('field_homepage_linking')
Appreciate helps!!
I can't seem to get the correct Unix epoch time out of this PHP DateTime object.
$startingDateTime = "2005/08/15 1:52:01 am";
$foo = new DateTime($startingDateTime, new DateTimeZone("America/New_York"));
echo $foo-format('U');
which gives
1124085121
Which is Mon, 15 Aug 2005 00:52:01 GMT -500 (according to http://www.epochconverter.com/) but that's incorrect by an hour.
It SHOULD be 1124088721 and spit back at me as Mon, 15 Aug 2005 01:52:01 GMT -500
Any help would be appreciated.
I'm looking for a PHP CMS which can let me to:
1-Uploade and manage files ( pdf, words..) between users by allowing to view, to print or to download.
2-Know who accessed what and when, who download what and when... who do what and when.
I'm building an iPhone app, which will allow users to log in to a PHP web server that authenticates the user and starts a session.
My idea for managing a session is to create a singleton User class that has a sharedLogin method. Would it be prudent to store the session variable in the shared instance in order to maintain the session?
How do I delay a PHP script that writes to a text file and then reads from the same file long enough to make sure changes have been written before I attempt the read?
Hi
I am trying to use the following regular expression to check whether a string is a positive number with either zero decimal places, or 2:
^\d+(\.(\d{2}))?$
When I try to match this using preg_match, I get the error:
Warning: preg_match(): No ending delimiter '^' found in /Library/WebServer/Documents/lib/forms.php on line 862
What am I doing wrong?
<?php
$console = new DOTNET("ProjectX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=KeyTokenHere-i used a real value here", "ProjectX.Core.Services.ServicX");
echo '1';
?>
The error message:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80070002] The system cannot find the file specified.
What's the problem can be?
hello
I'm new to PHP and I recently started learning Zend Framework. What DAL are you using? Do you think that Zend_Db_* can do the magic? I need it mainly for MySql db. Does it have any limitations and can I use it in big project without any problems because I don't want to go the wrong way.
10x
I'm building a website where I basically want my checkout to work like this website:
http://www.solutionkaizen.com/html/boutique.php
It allows you to enter the quantity for each item and then press a button which brings you to PayPal and lists how many Products you have.
On PayPal's website, all the info I found seems to lead to me needing a shopping cart. If this is absolutely necessary, how could I implement that?
Thanks
Hello,
I'm still quite new to CodeIgniter and I was wondering, where should I place my PHP functions that has nothing to do with Controllers and Views, for example, a function that access a local file.
Thank you.
Hello,
I would like to integrate the jQuery fullcalendar into my PHP website, but I don't know how to handle the event and how to use the JSON data from MySQL.
Any advice would be appreciated.
In my mind, a web app something that runs continuously; therefore, I'm confused by documentation pages that talk about the "end" of a PHP script (eg this one). Such references seem to refer to the end of each web request, but if the script ends there, doesn't that mean that the OS has to setup a whole new process for each request? That seems unlikely, because spinning up a whole new process is expensive, and be very inefficient for the whole site.
If I have a ZIP file whose structure is:
-directory1 DIR
-files in here
-directory2 DIR
-more files in here
Using pclzip.lib.php how can I open up this ZIP file and extract directory1 (recursive) into a directory and then extract directory2 (recursive) into another directory.
Hi
I am exporting data from php page to word document
I received the result in word format
but when the data's are in excess number then
the header are not available for the consecutive page
ex
my first page has title
Country
Name Country
uday India
akila India
my second page has no title such as name and title
kiran pakisthan
vikie america
how to get the titles on the consecutive pagess
I'm looking for an open source php form builder or form generator to add/edit/delete/search records?
I have to create a simple manager for some records, it's a common application that should be found easily, but I can't find any good code/class/application/etc :(
Any help is appreciated.
I have this function in .net code:
public class StringGenerator
{
public static string GenerateString(string hash)
{
return hash.GetHashCode();
}
}
I want to be able to call this from PHP page. Any idea how?
I've been doing some html scraping in PHP using regular expressions. This works, but the result is finicky and fragile. Has anyone used any packages that provide a more robust solution? A config driven solution would be ideal, but I'm not picky.
Hello all,
I'm trying to use php's file_get_content('a url');
The thing is if the url has '&' in it, for example
file_get_content('http://wwww.google.com/?var1=1&var2=2')
it automatically make a requests to wwww.google.com/?var1=1&var2=2
How do I prevent that from happening?
I am relatively new to php and have a feeling that I am going the long way round when displaying data from mysql.
I have a table a I want to show a few fields from my database.
How would I achieve this without having to echo every bit of the table???
Here is the code:
<?php
$query1 = mysql_send("SELECT firstname, lastname, email, user, country FROM customers WHERE id='".$_COOKIE['custid']."'");
while ($row = mysql_fetch_array($query1))
{
echo ' <table id="account_table" style="width:550px; border:none; ">
<tr>
<td width="155">Contact Name</td>';
echo '<td width="335">';
echo $row['firstname'] ;
echo ' ';
echo $row['lastname'];
echo '</td>
</tr>
<tr>
<td>Email Address</td>
<td>';
echo $row['email'];
echo ' </td>
</tr>
<tr>
<td>Username</td>
<td>' ;
echo $row['user'];
echo '</td>
</tr>
<tr>
<td>Country</td>
<td>';
echo $row['country'];
echo '</td>
</tr>
<tr>
<td>Time Zone</td>
<td>GMT+1</td>
</tr>
<tr>
<td>Activated</td>
<td>16 Dec 2009</td>
</tr>
</table>';
}
?>
Hello,
I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly (the closest to what I want to do).
I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented.
Do you know any ?
Thank you
hi all,
There is a problem in this code I can not detected
<?php echo "<a href ='$rows['Link']'> .$rows['UploadName']</a> "; ?>
Do you find you have a solution???
Thank you very much.
Using PHP, what's the fastest way to convert a string like this: "123" to an integer?
Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an array?