|
|
|
|
![]() ![]() |
Dec 14 2005, 07:41 PM
Post
#1
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,197 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
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? |
|
|
|
Dec 14 2005, 07:59 PM
Post
#2
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,029 Joined: 28-May 05 From: Hertfordshire, England Member No.: 7,593 ![]() |
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. |
|
|
|
Dec 15 2005, 07:55 AM
Post
#3
|
|
|
Incest is a game the whole family can play. ![]() Group: [MODERATOR] Posts: 1,197 Joined: 11-February 05 From: Heaven Member No.: 3,709 |
* Changes Code *
Oh yeah. Thanks for your help, rvalkass! /~* Locked |
|
|
|
May 6 2008, 06:36 PM
Post
#4
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
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 |
|
|
|
May 7 2008, 03:40 AM
Post
#5
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 4th July 2008 - 08:51 PM |