Rename text in html,php and css files [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
What is the best way to rename text in different files?
Need to rename all text who is ex:
static.website.com to static.newwebsite.com
The text in named in css,php and html files who is on one folder.
Im using Putty to see and change files.
The folder is on Ubuntu

If you have a terminal open on the Ubuntu machine, change to the directory where the files are (since you said they are all in the same directory) then use the following to replace all instances of static.website.com with static.newwebsite.com
sed -i'.bak' 's/static.website.com/static.newwebsite.com/g' ./*.{css,html,php}
-i'.bak' : -i means to edit in place and '.bak' will create a backup of the original with the extension .bak

Related

Access files on server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a private server on which I have placed a .php file in the root folder.
I want to run the .php file script by accessing it from the URL.
SO how can this be achieved.
Did you installed apache yet? to run a php page you need a web server like apache, nginx.
If installed, place your php file in public_html folder.
then, you can execute your php file by visiting http://yourdomain.com/yourpage.php

Prevent Copy the files from the server to server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have dedicated server, control panel is DirectAdmin and OS is linux. Using the copy copy ( "https://example.com/file.mp3" , string $dest) command in PHP, The file can be copied. How can I prevent? Prevent copying server to server this link for example: https://example.com/file.mp3
Take a look at this question on ServerFault (assuming you use Apache2):
Apache .htaccess file to restrict access to file except when loaded from a certain url
or this:
control Apache referrer to restrict downloads in htaccess file

Write the content into the batch file [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want to create a log file in my local system after running a batch file by setting a cronjob on my Windows machine.
As of now I'm displaying the contents in the console when the cronjob is executed - the same content I want to save in the form of log.
Note: I've tried syslog but it's not working. I have imported the index.php in the batch file.
Check dbenham implementation of tee command here.
You can output to the console like:
call batfile.bat | batchTee log.txt

Decrypt Synology PHP files [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I just downloaded a file of my Synology Diskstation but the content looks like this:
http://pastebin.com/eLLM8UZR
Is there a way to decrypt it?
The file is the youtube.php file for the Downloadstation.
Looking at the first bytes of the file, it looks like it is a .bz2 (bzip) file. Popular "unzippers" like 7zip should be able to unzip it to a usable file. If you have a more recent Synology DS, you might even have a "bzip2" on the command line (check bzip2 --help how to work with this command).

Web development in LAMP VM WARE [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a LAMP configuration set up in a VM WARE. I am going to transfer files via FTP using transmit client.
Currently I have my files in the following directory
192.133.323.122/website/project/home.php
Do I create a folder in a specific directory?
Usually it'll go in your
your_user_here/var/www
but it doesn't matter really, as long as you know where it is and you know how to reach it.
I would suggest creating a folder with the name of the site, so you can find it easily, so it'll be something:
your_user_root/var/www/project_name

Categories