|
The only things that worries me: Why do you want to know???
That's why I gave short, albeit correct answer...
|
|
|
|
|
Just for my knowledge .
|
|
|
|
|
how to copy directory from one webstie to other using ftp? like :-
I am at http://ab.com
Now i want to copy directory b of http://abc.com/a/b to http://ab.com/data/
|
|
|
|
|
|
You cannot transfer a file from one ftp to another ftp
directly by any mean.
For that you need to download that particular file and then
upload it to another ftp address.
For downloading and uploading you need to connect to ftp server.
http://www.php.net/manual/en/ref.ftp.php[^]
Try ftp_get and ftp_put method for download and upload.
Hope this will help!
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thanks for your help but problem is solved.
|
|
|
|
|
Ok buddy...
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
It's not possible to give a complete answer to this question here. I would suggest you find a copy of the Linux source (it's open source so free) and read through the code. Alternatively I expect there are many books describing how Linux works, try a Google search for some possibilities.
It's time for a new signature.
|
|
|
|
|
|
Hi friends,
I've moved the apps into the Linux server under a driectory (/home/webdev/apps), which file i need to look to find out the current URL i should use to make the application work in browse?
Do I have to check any configure under /etc or something else? Please help, I am lost now..many thanks..
(to make the question simple, i have moved my application into a folder created under my username, i need to know the exact URL mapping to this folder, how can I achieve that info.?)
|
|
|
|
|
Create a directory called public_html in your home directory, then move the application directory inside public_html . Make sure all directories have "execute" permission for all users. The URL will be http://your.machinename.here/~webdev/apps
|
|
|
|
|
|
Hi Guys,
I need to deploy a PHP application in a Linux server, can anyone walk me through the basic steps? Many thanks.
Situation:
1) I have a login and pwd(i tried sudo su -, but seems i don't have pwd for that).
2) I need to install PEAR and extensions for my application.
3) I need to configure my application to make it work.
Currently I don't know where to start, can anyone show me a roadmap?
Thanks
|
|
|
|
|
I checked the php info page and found below information:
include_path .:/usr/share/pear .:/usr/share/pear
am I (or someone else) supposed to install package/extension into that directory?? I checked the directory :/usr/share and found there is no pear subdirectory.
please help..thanks..
|
|
|
|
|
alexyxj wrote: 1) I have a login and pwd(i tried sudo su -, but seems i don't have pwd for that).
Then you don't have the necessary rights to install the software. Ask the system administrator to install it for you.
|
|
|
|
|
is there any way to check if the extensions have been installed? do you know normally whcih directory is for those package and extensions? Thanks..
I have below directories in my root:
ApacheWWW boot etc home lib64 media mnt net oraoem root selinux sys tmp var
bin dev export lib lost+found misc MySqlDB opt proc sbin srv tftpboot usr
please advise.
|
|
|
|
|
alexyxj wrote: is there any way to check if the extensions have been installed?
Maybe, but it depends on the Linux distribution you are using. If the software has been installed from sources bypassing the distro's package management then you need to ask your system administrator or scan your machine with find or locate for the related files.
|
|
|
|
|
Hi there,
I have a piece of code to search through a multidimensional array and return the keys of successful hits...
The problem is that I can see it has checked all though the array (the echo "@"; shows an @ for each element of the array) but the matches are not returned, the array contains at least 30 "status" fields.
Can anyone tell me where I'm going wrong..
Thanks
Here is the code:
$haystack = $server1 = $tx->extractTable();
$needle = 'Status';
$index = null;
$aIt = new RecursiveArrayIterator($haystack);
$it = new RecursiveIteratorIterator($aIt);
while($it->valid())
{
if (((isset($index) AND ($it->key() == $index)) OR (!isset($index))) AND ($it->current() == $needle)) {
return $aIt->key();
echo $aIt->key();
}
echo "@";
$it->next();
}
return false;
|
|
|
|
|
nhsal69 wrote:
return $aIt->key();
echo $aIt->key();
Is there any reason why you are returning and then outputing? The output code (echo) is unreachable.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Nope I just wanted to see what if anything was getting returned.. but it appears not.
|
|
|
|
|
Then there would appear to be something wrong with your logic.
nhsal69 wrote:
if (((isset($index) AND ($it->key() == $index)) OR (!isset($index))) AND ($it->current() == $needle))
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Ok, I've been staring at that for ages and my logic has vanished...
I re wrote it to this the below....
Only problem is that I still don't get a valid response..
the array is of the form :
[1] => Array ( [Name ] => Aberdeen [Status ] => Ready [Location ] => [Jobs ] => 0 [Model ] => HPUniversalPrintingPCL6 [Comment ] => PRINT_EARL
The correct number of "@" are retuned so it's performing the correct number of itterations, but no giving me the results...
I should have mentioned that I'm completely new to PHP and am kinda winging it....
Start of code chunk
$it = new RecursiveIteratorIterator( new RecursiveArrayIterator($server1));
echo "<table border='1'>";
foreach ($it as $key=>$val)
{
echo "@";
if ($val == "PRINT_EARL")
{
echo "<tr>";
echo "<td>";
echo $key;
echo "</td>";
echo "<td>";
echo $val;
echo "</td>";
echo "</tr>";
}
Else
echo $key.":".$val."\n";
}
End of code chunk
-- Modified Monday, May 3, 2010 10:51 AM
|
|
|
|
|
hi
i have written code in php to open a pdf file in browser
echo "<a href="pdf/abc.pdf">pdf</a>";
its not open pdf only start download file and after that i can open that file but i want to show this file on my browser while there is no iframe or other content please help me to show not download direct when i try to down load than download.
please suggest code for me
|
|
|
|
|
Google is your friend. Search for 'content-disposition header'. That's what tells the browser how to treat the pdf (or at least suggests). There is a php function to write the header.
|
|
|
|
|
Following code will be helpful to open pdf file.
<?php
// when form submitted, redirect to PDF file
if($file=="dick.pdf" || $file=="andrea.pdf" || $file=="lewis.pdf")
{
header("Location: $file");
exit();
}
// and else just display the thing
?>
<html>
<head>
<title>Download a PDF file</title>
</head>
<body>
<form action="thisfile.php" method="get">
<fieldset>
<legend>Please select a PDF file to download</legend>
<select name="file" size="1">
<option value="dick.pdf">Dick</option>
<option value="andrea.pdf">Andrea</option>
<option value="lewis.pdf">Lewis</option>
</select>
<input type="submit" value="Download!">
</form>
</body>
</html>
Hope this will help!
Jinal Desai
|
|
|
|