TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 01-27-2009, 04:55 PM   #1 (permalink)
The Contributor
 
webosb's Avatar
 
Join Date: Nov 2007
Posts: 41
Thanks: 24
webosb is on a distinguished road
Default need help on editing php files with arrays with php

not sure if this is the most efficient way of doing this but i have a file called myData.php that has the following:

PHP Code:
<?php
$data 
= array(
                array(
                    
"theURL" => "http://www.google.com",
                    
"title" => "Google",
                    
"someText" => "Google Search Engine",
                    
"moreText" => "Google Search Engine. Find whatever you want on the web.",
                    
"thumbnail" => "tn_google.jpg"
                
),

                array(
                    
"theURL" => "http://www.yahoo.com",
                    
"title" => "Yahoo",
                    
"someText" => "Yahoo Search Engine",
                    
"moreText" => "Yahoo Search Engine. Find whatever you want on the web.",
                    
"thumbnail" => "tn_yahoo.jpg"
                
),

                array(
                    
"theURL" => "http://www.msn.com",
                    
"title" => "MSN",
                    
"someText" => "MSN Search Engine",
                    
"moreText" => "MSN Search Engine. Find whatever you want on the web.",
                    
"thumbnail" => "tn_msn.jpg"
                
),                
);
?>
so I want to create a web interface to edit those values so i dont have some random person editing it and breaking it. So what is the best route for accomplishing this. Should I be using file_get_contents? or is there something better?
__________________
"Things you can get access to, you should never memorize." -Albert Einstein
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
webosb is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
Trying to upload files with PHP and Prototype AJAX EyeDentify General 6 01-19-2009 10:04 PM
Opening Php files displays script in browser j4v1 Absolute Beginners 8 06-04-2008 04:23 PM
PHP and external files /\/\ongoose General 16 12-10-2007 05:53 AM
Uploading Files with PHP daz Absolute Beginners 3 09-30-2007 06:23 PM


All times are GMT. The time now is 12:34 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design