Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
Ben be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo &amrver... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "e;Enter your html here..."e;;
$fp=fopen("e;temp/filesname.php"e;,w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {ve a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "e;Enter your html here..."e;;
$fp=fopen("e;temp/filesname.php"e;,w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable whenServer... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
Benince I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
Benut.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable ws say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}[/phpion about PHP, FTP & a Windows Server... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "e;Enter your html here..."e;;
$fp=fopen("e;temp/filesname.php"e;,w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_fiP & a Windows Server... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "e;Enter your html here..."e;;
$fp=fopen("e;temp/filesname.php"e;,w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}e the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/f have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
Ben directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "e;FTP us this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "e;Enter your html here..."e;;
$fp=fopen("e;temp/filesname.php"e;,w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It shouion about PHP, FTP & a Windows Server... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload sta an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "e;Enter your html here..."e;;
$fp=fopen("e;temp/filesname.php"e;,w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "e;FTP upload has a Windows Server... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!&p security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
BenI don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}Ite input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
Benion about PHP, FTP & a Windows Server... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creatin tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It shouneed some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:
Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_ion about PHP, FTP & a Windows Server... I don't have a Windows Server to tets this on so I need some input.
Let's say I have a script that creates writeable files that can be edited via an online PHP script...
I can't make the root directory (e.g: /the/root/directory/) writeable without opening up security issues which is what I don't want, but I still want to create writeable files and folders in the root directory using PHP... So the only way around this is using the PHP FTP commands right?
Since I can't create files using the FTP commands, the only way around this is creating a folder in the root directory (e.g: /the/root/directory/temp) and make that one folder writeable.
Then I use the PHP script to create a file in the temp folder:Code: Select all
$content = "Enter your html here...";
$fp=fopen("temp/filesname.php",w);
fputs($fp,$content);
fclose($fp);Ok, then to move it to the root directory I would have to use FTP commands...
Code: Select all
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}It should work fine on Windows?
And since the .php file was writeable when created, it will stay writeable even when moved?
Is that how it would work?
Woudl the same apply for creating folders?
Thanks for your input
Ben