append part of php file

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts Page 1 of 1
Contributors
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

append part of php file
zachman61
What i'm trying to do is upload a file, and create a div inside of the page which has an image relating to the file depending on a setting in the program.
But I have no idea on how to achieve this.
I'll make an example of what I want as an image
Image

I want it to choose the picture via the program, which will have a combobox.

Basically I want it to do create a new version of the code below for each file uploaded, with a link to the file.
Code: Select all
<div class="mw3file"><img src="mw3.jpg" title="Modern Warfare 3 Render Pack" /><br /><a href="files/renderpack.zip">Modern Warfare 3 Render Pack.zip</a></div>
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: append part of php file
Axel
What is stored in the file ? what is the file? I didn't get your question too well lol
http://vagex.com/?ref=25000
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: append part of php file
mandai
Is this being used on a web server or is it offline?
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: append part of php file
zachman61
Axel wrote:
What is stored in the file ? what is the file? I didn't get your question too well lol
The file is a savegame that is uploaded via the program and php, but I want when its uploaded the php file with edit another php file and insert the container posted above.
mandai wrote:
Is this being used on a web server or is it offline?
Its on a web server.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: append part of php file
mandai
You might want to use a PHP script to list the files in a directory and output the HTML.
You could also use a script to upload files.
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: append part of php file
zachman61
mandai wrote:
You might want to use a PHP script to list the files in a directory and output the HTML.
You could also use a script to upload files.
I tried making my own script using a form, but I couldn't get it to only upload a specific extension.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
6 posts Page 1 of 1
Return to “Tutorial Requests”