|
Thank you very much for your help brother. You are such a nice person.Thanks again.
|
|
|
|
|
I am searching for a user defined function which take the input and display the form by itself. what all we need to do is just supply it variables required. Can anyone help me?
|
|
|
|
|
you'll have to create it yourself as you'll probably need to say wether inputs are text/file, include css classes etc
What you can do though is put it in a function:
If you want to cut some corners you can try using jquerys form submission and php has a function to split up a query string (GET only I think).
|
|
|
|
|
http://ck.com/me.php?scrip=500490
$us="";
if($us=='507878')
{
$us='rock';
echo $us;
}
??
<title><? echo $_GET['us'] ?>
how to make this code working ?
modified on Sunday, July 26, 2009 5:04 AM
|
|
|
|
|
<html>
<head>
<title>
</title>
</head>
<body>
<?php
$us=507878;
if($us=='507878'){
$us='rock';
echo $us;
}
?>
</body>
</html>
|
|
|
|
|
How to use wild card in php ? like dos.Example :- c:/copy *.* c:/yoyo/*.* can php do this job?
|
|
|
|
|
Is this a result of using the previous code given to you? In which case you do know that you can specify the location that you are saving the new file eg. 'yodo/newFile.txt'
Also you can skip the copying of the file from one site to yours, which I suggested earlier, by simply reading the file straight from the other site.
function copyOldFileToNewFile($oldLocation, $destinationFolder)
{
$splitted = explode('/', $oldLocation);
$newLocation = $destinationFolder.$splitted[count($splitted) - 1];
$fh = fopen($newLocation, 'x')
or die("unable to open file");
foreach (file($oldLocation) as $oldLine)
fwrite($fh, str_replace('" "', '', $oldLine));
fclose($fh);
}
copyOldFileToNewFile('http://www.ab.com/ab.txt', 'yodo/');
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
I have opened the SQL premier database file(mdf file) in Microsoft Visual Studio Version selector by mistake.Is it possible for me to restore the previous format.
I am using Microsoft SQl server with .net dataprovider.
I am using Vista.
Thanks.
|
|
|
|
|
Can I execute DOS command in client mashines with PHP
|
|
|
|
|
Client machines? Certainly not.
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
I think with you. I want to get client MAC address using PHP
|
|
|
|
|
How to write .txt file in php ? suppose i am reading ab.txt file form ab.com and want to write this file for my own website in my web server so how to do this job ?
|
|
|
|
|
it would be something like
$myFile = "abc.txt";
$fh = fopen($myFile, 'w') or die("unable to open file");
$stringData = "This is a test line.\n";
fwrite($fh, $stringData);
$stringData = "Tracy Tanner\n";
fwrite($fh, $stringData);
fclose($fh);
|
|
|
|
|
Thanks for you answer brother but i don't want to create any file on my computer's HD. I want to know how to create a .txt file on my web server and source of file is coming from other website's .txt file Example:-http://www.ab.com/yara.txt
now i want to copy this file in my web server's folder
example :- http://www.jumma.com/wow/
Now tell me how you can do this job using php?
|
|
|
|
|
the code shown creates a txt file wherever the code is. so if its on your computer it will make a txt file on your computer, if it's on the server it will make a txt file on the server
|
|
|
|
|
Do you just want to copy the file?
if (copy('http://www.ab.com/ab.txt', 'newFile.txt'))
echo 'Copied file.';
else
echo 'Failed to copy file.';
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks for your help your code is working good .Why i am getting this massage:Copied file.Error in my_thread_global_end(): 1 threads didn't exit.One more question please If there is any "" and space in data example:-"122" "87" So how to remove these "" and space from .txt file and save as a new file example:- http:yoyo.com/ram.txt to http:yoyo.com/krishana.txt
|
|
|
|
|
Do a quick bit of research to see how to read a file line by line (Google => 'php read file line by line'[^]). Then, for each line use $newLine = str_replace ('" "', '', $oldLine) . Then use the code provided by Muhammad Mazhar[^] in your other response to write the new line to the new file.
As regards to your error message, Google[^] it.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks for your help. Can php copy all .txt file in one shot if yes then please tell me how ?.
|
|
|
|
|
Hi all,
May you help me?
In php, how can we build a service chat the same as yahoo web chat?
I have a website and there are more users. I wanna build an online chat so that a user can chat with others when they are login.
Can we integrate yahoo api or google chat api?
Thanks,
Alien
|
|
|
|
|
you are going to have to sit down and get start coding yourself I'm afraid. The following resources may help:
w3schools.com
tizag.com
AlienPham wrote:
Can we integrate yahoo api or google chat api?
If there is an API then yes that's likely
|
|
|
|
|
i m inserting data in two tables(table1,table2).first i m inserting data in table one and after that i want that the field of table one addressid(which is autoincremented in table) will insert in table2.and i also have problem in fetching max(addressid) on form after post.
|
|
|
|
|
|
Why would anyone help you to hijack peoples email accounts?
Your site will fail.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
<iframe frameborder=0 src="http://www.gmodules.com/ig/ifr?url=http://raja.com/ig/ab.xml&amp;up_k1=<? echo $_GET['us']?>&&amp;up_k2=&amp;up_k3=&amp;up_k4=&amp;up_k5=&amp;up_k6=&amp;up_k7=&amp;up_k8=&amp;up_k9=&amp;up_k10=&amp;up_interval=60&amp;synd=open&amp;w=400&amp;h=50&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;" width=412 height=60></frame>
This in an HTML Code.How to write this code in php ?
|
|
|
|