Completado

Fix a simple PHP script

I wrote a script to open, edit and save a css file.

It only works if I put the css file in the same directory as the php script.

I need it to work when the css file is in a different directory to the css script.

For example:

The script is located in: /public_html/admin/[login to view URL]

The file I want to edit is located in: /public_html/includes/templates/responsive_classic/css/[login to view URL]

Please look at the script and see what is wrong.

The code I am using is:

<?php

if($_POST['Submit']){

$open = fopen('../includes/templates/responsive_classic/css/[login to view URL]',"w+");

$text = $_POST['update'];

fwrite($open, $text);

fclose($open);

echo "File updated.<br />";

echo "File:<br />";

$file = file('../includes/templates/responsive_classic/css/[login to view URL]');

foreach($file as $text) {

echo $text."<br />";

}

}else{

$file = file('../includes/templates/responsive_classic/css/[login to view URL]');

echo "<form action=\"".$PHP_SELF."\" method=\"post\">";

echo "<textarea Name=\"update\" cols=\"35\" rows=\"35\">";

foreach($file as $text) {

echo $text;

}

echo "</textarea>";

echo "<input name=\"Submit\" type=\"submit\" value=\"Update\" />\n

</form>";

}

?>

Habilidades: PHP, Arquitectura de software

Ver más: script php simple wap, image upload script php simple, server status script php simple, update script php simple, software write mq4, software write chip epson, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, script php simple addition pages, software write websites idea, software write book images, software write books, software write protection, free software write book, login script php simple, software write book, free simple referral script php

Información del empleador:
( 7 comentarios ) Billinudgel, Australia

Nº del proyecto: #11801936

Adjudicado a:

aryan151

Hello sir i can fix it i am having 7 years of experience....Hello sir i can fix it i am having 7 years of experience....

$10 AUD en 1 día
(295 comentarios)
6.8

16 freelancers están ofertando el promedio de $23 para este trabajo

rajeshsonisl

Hello! With 98% to 99% completion rate, 900+ successfully completed projects, and a 4.99 reputation (maximum possible, 5.0) (can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... y Más

$24 AUD en 1 día
(923 comentarios)
8.6
waelfree

Hi, i can fix that let us start ...........................................................................

$15 AUD en 1 día
(190 comentarios)
7.9
usmanrana07

Hi! I have viewed your script and I can provide my instant services for this task to be resolved. Contact me if you are looking for quality output in reasonable time and rate.'waiting for your response. Thanks

$45 AUD en 1 día
(43 comentarios)
6.0
$10 AUD en 1 día
(205 comentarios)
6.0
ChiragLathiya

Hi, My bid price may be higher than other freelancers, that's what I believe in quality work rather than completing incomplete work. Please initiate a message to me so that we can discuss about the project in det Más

$20 AUD en 1 día
(252 comentarios)
6.1
fahada305

hello sir, i have already done this type of work many times. i can suggest you some more to edit your css file directly in browser. thank you

$10 AUD en 0 días
(60 comentarios)
5.9
$25 AUD en 1 día
(86 comentarios)
5.9
Chaalan

A proposal has not yet been provided

$25 AUD en 1 día
(47 comentarios)
5.0
kunashe

Hi! I would be happy to correct the script so you can edit a CSS located in a different directory. Regards, Ku

$20 AUD en 0 días
(33 comentarios)
4.9
itezazmohsin

By profession am a software engineer and information security analyst. I have done several information security and development projects. I have recently updated my portfolio please have a look at it [login to view URL] Más

$30 AUD en 1 día
(40 comentarios)
4.5
ausprofreelancer

Hello, I can assist with your project and correcting the paths issue to your css file. If you would like to contact me with some further details, we can go from there. Thank you

$45 AUD en 1 día
(4 comentarios)
4.4
sadaquat

I am a highly motivated with strong creative and conceptual skills, always prepared to accept challenging tasks and hence, I am here to further enhance my personal and professional growth. JAVA-SE (OOP,Collection,J Más

$23 AUD en 1 día
(2 comentarios)
3.7
mohit56

I have 3+ Years professional experience with in depth knowledge of php.I assure high quality and in time delivery.

$15 AUD en 1 día
(0 comentarios)
0.0
Ansyg

A proposal has not yet been provided

$25 AUD en 1 día
(0 comentarios)
0.0
$25 AUD en 1 día
(0 comentarios)
0.0