electriic ink
Dec 14 2005, 07:41 PM
Hi. I've just created a php script. The main object of the script is to delete some old files and replace it with a new file with some new content, effectively moving the contents from one file to another. These are the first 50 lines of the file: CODE <?
/* Calculate For The "A" Group - The Latest Games ID */
$a_B = 002;
while(file_exists("a_" . $a_B . ".dat")) {
$a_B++;
}
$new_page_contents = " <? $title = \"" . $_POST["new_name"] . "\"; include \"/home/cmatcme/public_html/header.php\"; echo = \"<h3>" . $_POST["new_name"] . "</h3> " . $_POST["new_desc"] . " <object> <embed src='" . $_POST["new_game_url"] . "'> </object> include \"/home/cmatcme/public_html/footer.php\"; ?> ";
$a_stream = fopen($a_B . ".cmat", "w+"); fwrite($a_stream, $new_page_contents); fclose($a_stream);
/* Calculate For The "B" Group - The Group Of The Games UniQue Numbers */
$b_1 = file_get_contents("/home/cmatcme/public_html/games/b_1.dat"); $b_2 = file_get_contents("/home/cmatcme/public_html/games/b_2.dat"); $b_3 = file_get_contents("/home/cmatcme/public_html/games/b_3.dat"); $b_4 = file_get_contents("/home/cmatcme/public_html/games/b_4.dat"); $b_5 = file_get_contents("/home/cmatcme/public_html/games/b_5.dat");
unlink("/home/cmatcme/public_html/games/b_6.dat");
$b6_stream = fopen("/home/cmatcme/public_html/games/b_6.dat", "w+"); fwrite($6_stream, $b_1); fclose($6_stream);
unlink("/home/cmatcme/public_html/games/b_5.dat");
$b5_stream = fopen("/home/cmatcme/public_html/games/b_5.dat", "w+"); fwrite($5_stream, $b_2); fclose($5_stream);
unlink("/home/cmatcme/public_html/games/b_4.dat");
$b4_stream = fopen("/home/cmatcme/public_html/games/b_4.dat", "w+"); fwrite($4_stream, $b_3); fclose($4_stream);
unlink("/home/cmatcme/public_html/games/b_3.dat");
$b3_stream = fopen("/home/cmatcme/public_html/games/b_3.dat", "w+"); fwrite($3_stream, $b_4); fclose($3_stream); Line 31 has been highlighed in red as that is where the error apparently is. This is the error: QUOTE Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/cmatcme/public_html/games/XXXXX.cmat on line 31 That line is no different to any of the others surrounding it, so why that line?
Reply
rvalkass
Dec 14 2005, 07:59 PM
Are you sure that the file exists? If it doesn't then you've effectively got code which says: $b_4 = It may seem simple, but it's often the simple things that people miss  However, when I counted down I got the 31st line as the one which says: CODE fwrite($6_stream, $b_1);
I don't see anywhere in the code where you set a value for $6_stream, so you are creating a file with a blank name. Just another thought. PHP is very temperamental.
Reply
electriic ink
Dec 15 2005, 07:55 AM
* Changes Code * Oh yeah.  Makes you wonder how you can miss something like that even after trying to figure it out for about 1/2hr. Thanks for your help, rvalkass! /~* Locked
Reply
iGuest
May 6 2008, 06:36 PM
Hope you can answer my question
Parse: Error Unexpected T_lnumber
I have an annoying php problem. I am a Newbie and cannot sleep because of this. Parse error: parse error, unexpected T_LNUMBER Below is the php script: <?PHP //Modify your data in this section //---------------------------------------------------------------------------------- $username = "goddy"; // Admin username $password = "kennel"; // Admin password //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- //First, define the modules you want to be displayed : Google, Yahoo, Amazon and the number of news displayed $show_google = "1"; // Show google ads ? $show_yahoo ="0"; //Show yahoo ads? WARNING : Be sure not to have both show_google and show_yahoo enabled $show_amazon = "1"; // Show Amazon feed ? $_numResults ="5"; // Number of news displayed in each page $_linksResults = "5"; // Number of links on links pages $use_privacy_policy = "1"; // Enable privacy policy page? $use_terms_of_service = "1"; // Enable TOS page? $use_contact_page = "1"; // Enable contact page? $use_top_links = "1"; // Enable links page? $use_products = "1"; // Enable recommended products? $use_image_rotation = "1"; // Enable image rotation? //----------------------------------------------------------------------------------- // Configuration of your local installation and personal site definitions $templatefoldername="includes"; //folder where templates are installed relative to the DocumentRoot. $mysitename = "biggydaddy"; //name for your site $mainkeyword = "biggydaddy"; //primary site keyword //----------------------------------------------------------------------------------- // your personnal affiliate ID in the following programs $adsense_pub = "pub-56156429875626"; //your adsense publisher code $adsense_channel = ""; // adsense channel $yahoo_pub =""; // your Yahoo Publisher code YPN $yahoo_channel=""; // your Yahoo channel $Aassociates_id=array( 'uk' => 'INVALID' , // <-- replace INVALID with your amazon.Co.Uk associate ID 'us' => 'some-20' ,// <-- replace INVALID with your amazon.Com associate ID ); $num_amazon = "5"; //Max number of amazon products to return //------------------------------------------------------------------------------------- ?> -reply by Julien
Reply
iGuest
May 7 2008, 03:40 AM
Did I do something wrong?
Parse: Error Unexpected T_lnumber
I sent an question and no one replied to me. Did I do something wrong by posting a question about my problem? or do you take a long time to answer the posts? Thanks.. Just tired of trying to get my site up Below is the php script: <?PHP //Modify your data in this section //---------------------------------------------------------------------------------- $username = "goddy"; // Admin username $password = "kennel"; // Admin password //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- //First, define the modules you want to be displayed : Google, Yahoo, Amazon and the number of news displayed $show_google = "1"; // Show google ads ? $show_yahoo ="0"; //Show yahoo ads? WARNING : Be sure not to have both show_google and show_yahoo enabled $show_amazon = "1"; // Show Amazon feed ? $_numResults ="5"; // Number of news displayed in each page $_linksResults = "5"; // Number of links on links pages $use_privacy_policy = "1"; // Enable privacy policy page? $use_terms_of_service = "1"; // Enable TOS page? $use_contact_page = "1"; // Enable contact page? $use_top_links = "1"; // Enable links page? $use_products = "1"; // Enable recommended products? $use_image_rotation = "1"; // Enable image rotation? //----------------------------------------------------------------------------------- // Configuration of your local installation and personal site definitions $templatefoldername="includes"; //folder where templates are installed relative to the DocumentRoot. $mysitename = "biggydaddy"; //name for your site $mainkeyword = "biggydaddy"; //primary site keyword //----------------------------------------------------------------------------------- // your personnal affiliate ID in the following programs $adsense_pub = "pub-56156429875626"; //your adsense publisher code $adsense_channel = ""; // adsense channel $yahoo_pub =""; // your Yahoo Publisher code YPN $yahoo_channel=""; // your Yahoo channel $Aassociates_id=array( 'uk' => 'INVALID' , // <-- replace INVALID with your amazon.Co.Uk associate ID 'us' => 'some-20' ,// <-- replace INVALID with your amazon.Com associate ID ); $num_amazon = "5"; //Max number of amazon products to return //------------------------------------------------------------------------------------- ?> -question by jULIEN
Reply
Recent Queries:--
unexpected t_lnumber in - 8.11 hr back. (1)
-
parse error: parse error, unexpected t_lnumber - 5.14 hr back. (2)
-
php unexpected t variable - 16.81 hr back. (1)
-
unexpected t_lnumber php - 20.83 hr back. (2)
-
php unexpected t_lnumber - 22.10 hr back. (1)
-
php error unexpected t_lnumber - 27.15 hr back. (1)
-
unexpected t_lnumber - 28.13 hr back. (1)
-
t_lnumber php mysql - 29.88 hr back. (1)
Similar Topics
Keywords : parse, error, unexpected, t, lnumber, php, parse, error, running, script
- Php Guest Online Script
(0)
How To Make A View New Post Script?
(5) Ok so i'm still working on the forum software i posted about a while back, but I have no idea
how to do this. I want to make a view new post script, as this is one of the main things that my
forum software dose not have that all other forums have. so does any body have an idea on how i
would do this? Thanks.....
Guessing Php Script
(0) I am looking for: freeware php quess the person in the photo game script....
Mysql Error
(3) ok i need some more help from the wonderful coders here at Trap. I'm almost done with my CMS
script, but i'm having a problem with the installer.php file, when it trys to inseret the user
data into the database i keep getting the following error: CODE mySQL Error: You have an
error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near ';INSERT INTO `members` (`id`, `name`,
`username`, `password`, `email`, `title`) ' at lin....
Unexpected T_string In User.php [resolved]
(5) Ok so i'm working on a site for my chruch, and i seem to be having a little bit of trouble with
the user.php file i keep getting the following error: CODE Parse error: syntax error,
unexpected T_STRING in /home/darkzone/public_html/test/user.php on line 195 and i was wondering
if some one could help me with the script. session_start(); ob_start(); //Include the
configurations include('config.php'); //Define a few variables $x = $_GET ;
$u = $_GET ; class register { function displayform($title) { echo('....
Unexpected T_variable...
Help! (3) I did construct the database connection file which is called "config.php". But, I got some mistake
that has to be solved to continue with working. This is the code itself: //Set the database
values $confg ="alex1985_admin" //Your database username $confg ="" //Your database
user's password $confg ="localhost" //Your host $confg ="books" //Your database name
//Create the function to log into the DB function db_login() { global $confg; $link =
@mysql_connect($confg , $confg , $confg ) or die("Error connecting: " . mysql....
Need Help Installing Dolphin Community Script!
(5) I'm not sure if this is the right place to post this but I really need help in installing the
dolphin community script. I have absolutely no previous experience of scripts or programming. I
would really appreciate if someone could walk me through it step-by-step, or even do it for me by
logging into my cpanel. I have tried to install it my self but I'm a little confused. I'm
sure it won't take very long at all for someone who has done this before.....
How Do I Connect To Live Database With Php Script?
while being hosted with ComputingHost (6) I am not new to programming. I want to create a form to add some values into my tables, the code
are all working. But I am not sure what is the URL to connect to my site's database. All along,
I have been testing through MAMP, which provides a local copy of mySQL. Can anyone lend me a hand?
My site's URL is http://limetouch.com/ ....
Download Script For Mp3 Files
(0) Hello, I'm looking for a download script for sound files (e.g. mp3, avi, wma, and other ones).
i have found a few download scripts but they would not work for sound files for some reason. also
this will not be used for allowing downloading of illegal or riped music, what i will be using this
script for is i'm making a site for my church and the pastor wants to be able to recored the
services and then have me upload them to the site so that the church members can download them for
what ever reason. If some one could tell me how to make one or could show me a plac....
Php Rediret Script
(12) Ok, what I am trying to do is this. Re-direct a domain name called: avalon.asn.au to
preschool.stmarksavalon.org.au I have created a script that will re-direct within the a folder.
However, the avalon.asn.au and stmarksavalon.org.au are PARKED Domains. Any ideas on how to create
this PHP Redirect Script please?....
Forum Script
(3) Hello, i'm wanting to start making my own forum software but i dont know where to start or what
i need to know in order to do this. I know i will need php and mysql but what else, and could some
one point me to a good site were i could learn php and mysql. Thanks ....
How Would I Go About Making A Simple "counting" Script?
(3) I plan on making a script for basic voting between different options, and I'd like to know what
PHP coding I would require. Basically, each choice will be as simple as this: CODE <form
method="post" action="process.php"> Best falsetto?<br><br>
<input type="radio" name="1"> Person A<br> <input
type="radio" name="2"> Person B<br> <input type="submit"
value="Submit"> </form> What PHP would be used to basically add 1 value to a....
Library Script
Where? (6) Hello, everyone. Anyone knows where I can get a library script that acts like CMS script software,
you can add books or delete them. I want to build virtual online library which can be accessible to
everyone. Or just give me some advices how to make it build. I'm a novice in programming.....
Script Not Working
I don't know why. (6) For some reason my random string script is not working. I got a fatal error when I tried it under
XAMPP. I do not know why. It looks syntatically correct. Could someone help me? Here is the script:
(Warning its over 100 lines long) //This PHP script will generate a random array and turn it into
a string consisting of 0-9 and A-Z. // This is the first developmental version. //Create 10 item
array for string $string = array(0,0,0,0,0,0,0,0,0,0); //Create function to replace 10-36 with
A-Z function conToStr() { for ($a = 0;$a switch($string ) { ....
Script Help Required: Undefined Variable
A fault I cannot spot in PHP (3) Hi, when running a PHP script I keep getting the error: QUOTE Notice: Undefined variable: bret
in c:\program files\easyphp1-8\home\poll.php on line 294 Notice: Undefined
variable: bret in c:\program files\easyphp1-8\home\poll.php on line 294 (And,
yes, I get it twice). The code related to the variable is as follows: CODE function
LogString($string,$type) { $t_log = "\n";
$t_log .=
$this->globaldata->server_vars['REMOTE_ADDR']."....
Php Downloads Script
(3) I've been looking all over the net for a PHP script which can provide an interface to browse a
downloads database. The database could be powered by MySQL. If you know a script like this, please
post it here. Thanks in advance, Ironchicken.....
Php Objects: Catchable Fatal Error
There is a weird problem with objects in php 5.2.2 (4) in php 4.4.7 my code seems to be ok but in later version 5.2.2 i get this error Catchable fatal
error: Object of class mission_rank could not be converted to string in
/Applications/xampp/xamppfiles/htdocs/nexus/includes/forms/cn_reload.php on line 41 cn_reload.php
include('../class/userClass.php'); session_start(); $app_user =&
$_SESSION ; if ($app_user->character != false) { $race_letter =
array('H','E','T','M','G'); $cn_id = 0; foreach
($app_user->character as....
Will This Code Work
php linking script ?p= (5) hi i'm not that great at php so i'm not to sure if this will work or not. but what i want to
do is be able to use ?p=staff or what ever page name, with out the php extion, and i would like to
no if this simple script i made would work. the code is: CODE <?php $p =
$_GET['p']; if ( !empty($p) &&
file_exists('./' . $p . '.php') && stristr( $p, '.'
) == False ) { // pages = directory where you store your pages $file = './'
. $p . '....
Php Sessions And Post Variables Issues
My script dosent seem to work as intended (1) You can test it out for yourself at http://sonesay.trap17.com/application.php I've been
working on this page locally and it seems to be working fine but when I upload it to my trap17
account the post variables dont get saved properly. Fill in some fields and submit it, the form
will come up as a empty field yet when you resubmit it without any modifications and the data you
entered in orginally will now magically appear, resubmit it again and it will be gone. This is
really annoying as I have no clue why it would be doing this when it seems to work fine locally.....
Html Code Tester. Online Script
(15) Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if
this works. I have not tested it yet, but I will later and post back with a demo and fix it up.
Current script: CODE <?php //Save this as something like htmltest.php function
CheckForm() { $html_unsafe=$_POST['code']; //Gives us our user
input $html_safe=str_replace("<?php"," ",$html_unsafe);
//Starts security measures $html_safe=str_replace("?>","
",$html_sa....
Is This A Good Script?
A login script (9) Okay, I am trying to password one page of my website. I need confirmation if this is a safe code or
not. The whole code is on the page I'm protecting. CODE <?php
include('header.php') ?> <?php // Define your username and password
$username = "THE_USERNAME"; $password = "THE_PASSWORD"; if
($_POST['txtUsername'] != $username ||
$_POST['txtPassword'] != $password) { ?>
<h1>Login</h1> <form name="form" method=&....
Creatting A Playlist Through Php
script help needed (5) Hi I am trying to make a script so that i can insert songs into a playlist, but i need a script in
which it opens the playlist file and removes the closing tag at the end, so before i can add more
entrys. e.g CODE <atx> <entry>Location 5</entry> <entry>Location
4</entry> <entry>Location 3</entry> <entry>Location
2</entry> <entry>Location 1</entry> <atx> But to add more entrys
i would have to get rid of the atx, then use the fputs to place the new entry into the file. ....
What Kind Of Script Do You Need ?
post here and get free script (15) Hi everybody sorry if i posting here , i know I want design free PHP script and i dont know
webmasters what kind of scripts want i think its better to aks here becuase trap17 is very nice
webmasters forum So , Plz post here what kind of script with details you need ! sorry may en
is not very well for example you need "upload center" : write "upload center" with upload center
options ( like Ajax , Fast , multi lan and ... ) with this post we can give script details and
webmasters idea /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.....
Wappy Buddy V1.10 - Tibia Gold Edition By Wappy & Jon Roig
the official wap download script (3) By downloading this script you are agreeing to the license and terms outlined below /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> QUOTE /** * *
@package: wappyBUDDY - Tibia Gold Edition * @version: 1.10 2006/10/01 00:00:01 wappy * @copyright:
©2003, 2006 jon roig, wappy * @release notes: this is the first official release of my download
script despite pirate and incomplete copies floating around that were stolen from one of my previous
servers. The next release will follow very shortly * @terms: wappyBUDDY is free softw....
Free Auction Script
Any Suggestions? (6) Any free auction script suggested? I want it to be as many practical functions as possible, yet
easy to manage. And more importantly, it is free! Appreciate your kind suggestions!....
Wappychat_oldskool
old version of my wap chat script :-) (15) here is a very old version of my wap chat script, its not very advanced but has privates, smileys
etc. I will post some further versions (with owner, admin, mod status and profiles) when i have time
to write the readme/install instructions for them. You will find instructions inside the zip. If you
have any problems post here but i know it don't work on all servers for some reason but it does
work on the trap server so will be cool ok /tongue.gif" style="vertical-align:middle" emoid=":P"
border="0" alt="tongue.gif" /> ....
Script That Tracks The User Status
how can I track on or offline users? (4) long explaination: hey, I'm building a user profile site right now. And, I kinda know how to
make a online/offline detector, but not totally sure. I know I can make a mysql database to track
them, but how does it entrer the information? I could easily put in a field where when they login it
sets them to online, but if they don't sign out, and just exit the browser, how can I tell.
short: I want someone to tell me how to make a online/offline status detector, like they have here
on trap17. I'd be thrilled if you can post to this, thanks, arcticsnpr....
Watermark Your Image With Simple Php Script
found it on the net (34) This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
Scripts site. Just in case the site may not show, I will include the code here: List of things
needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
transparent gif image with the watermark - goes in the same directory as this script // ....
Transfer Variables To Another Php Script
(8) Hello, I've one registration page where the users fills in their information, is it possible to
trasnfer the things the fill in on the registration page to another script that does someting and
returnes something to the first page like true/false and then the registration gives an error
messange if the other php script returned false? Something like the script "activates" another
script that does something and returnes the result back to the original script. Best Regards ....
Script: Php Jukebox
A one file script! (4) This scripts is so simple, you dont need to edit ANY of it! All you have to do is make a folder
called 'songs' and put some audio files in it. Here is the whole page, I named it index.php
and put it in a folder called 'music': CODE <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
<title>PHP jukebox</title> </head> <body> <!-- ©2005 Craig
lloyd. All rights reserved. Visit cragllo.com for more sc....
Looking for parse, error, unexpected, t, lnumber, php, parse, error, running, script
|
|
Searching Video's for parse, error, unexpected, t, lnumber, php, parse, error, running, script
|
advertisement
|
|